Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ XmlDataTypeName()

static string System.Data.XmlTreeGen.XmlDataTypeName ( Type type)
inlinestaticpackage

Definition at line 154 of file XmlTreeGen.cs.

155 {
156 if (type == typeof(char))
157 {
158 return "_";
159 }
160 if (type == typeof(byte[]) || type == typeof(SqlBytes))
161 {
162 return "base64Binary";
163 }
164 if (type == typeof(DateTime) || type == typeof(SqlDateTime))
165 {
166 return "dateTime";
167 }
168 if (type == typeof(TimeSpan))
169 {
170 return "duration";
171 }
172 if (type == typeof(decimal) || type == typeof(SqlDecimal) || type == typeof(SqlMoney))
173 {
174 return "decimal";
175 }
176 if (type == typeof(int))
177 {
178 return "int";
179 }
180 if (type == typeof(bool) || type == typeof(SqlBoolean))
181 {
182 return "boolean";
183 }
184 if (type == typeof(float) || type == typeof(SqlSingle))
185 {
186 return "float";
187 }
188 if (type == typeof(double) || type == typeof(SqlDouble))
189 {
190 return "double";
191 }
192 if (type == typeof(sbyte) || type == typeof(SqlByte))
193 {
194 return "byte";
195 }
196 if (type == typeof(byte))
197 {
198 return "unsignedByte";
199 }
200 if (type == typeof(short) || type == typeof(SqlInt16))
201 {
202 return "short";
203 }
204 if (type == typeof(int) || type == typeof(SqlInt32))
205 {
206 return "int";
207 }
208 if (type == typeof(long) || type == typeof(SqlInt64))
209 {
210 return "long";
211 }
212 if (type == typeof(ushort))
213 {
214 return "unsignedShort";
215 }
216 if (type == typeof(uint))
217 {
218 return "unsignedInt";
219 }
220 if (type == typeof(ulong))
221 {
222 return "unsignedLong";
223 }
224 if (type == typeof(BigInteger))
225 {
226 return "anyType";
227 }
228 if (type == typeof(Uri))
229 {
230 return "anyURI";
231 }
232 if (type == typeof(SqlBinary))
233 {
234 return "hexBinary";
235 }
236 if (type == typeof(string) || type == typeof(SqlGuid) || type == typeof(SqlString) || type == typeof(SqlChars))
237 {
238 return "string";
239 }
240 if (type == typeof(object) || type == typeof(SqlXml) || type == typeof(DateTimeOffset))
241 {
242 return "anyType";
243 }
244 return string.Empty;
245 }

References System.Xml.Dictionary, and System.type.

Referenced by System.Data.XmlTreeGen.AddColumnProperties(), System.Data.XmlTreeGen.AddXdoProperty(), System.Data.NewDiffgramGen.GenerateColumn(), System.Data.XmlTreeGen.HandleColumnType(), System.Data.XmlTreeGen.HandleTable(), and System.Data.XmlDataTreeWriter.XmlDataRowWriter().