Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
XmlILTypeHelper.cs
Go to the documentation of this file.
3
5
6internal static class XmlILTypeHelper
7{
8 private static readonly Type[] s_typeCodeToStorage = new Type[55]
9 {
21 typeof(string),
22 typeof(string),
23 typeof(bool),
24 typeof(decimal),
25 typeof(float),
26 typeof(double),
27 typeof(string),
36 typeof(byte[]),
37 typeof(byte[]),
38 typeof(string),
41 typeof(string),
42 typeof(string),
43 typeof(string),
44 typeof(string),
45 typeof(string),
46 typeof(string),
47 typeof(string),
48 typeof(string),
49 typeof(string),
50 typeof(long),
51 typeof(decimal),
52 typeof(decimal),
53 typeof(long),
54 typeof(int),
55 typeof(int),
56 typeof(int),
57 typeof(decimal),
58 typeof(decimal),
59 typeof(long),
60 typeof(int),
61 typeof(int),
62 typeof(decimal),
65 };
66
67 private static readonly Type[] s_typeCodeToCachedStorage = new Type[55]
68 {
95 typeof(IList<byte[]>),
96 typeof(IList<byte[]>),
124 };
125
127 {
128 Type type;
129 if (qyTyp.IsSingleton)
130 {
131 type = s_typeCodeToStorage[(int)qyTyp.TypeCode];
132 if (!qyTyp.IsStrict && type != typeof(XPathNavigator))
133 {
134 return typeof(XPathItem);
135 }
136 }
137 else
138 {
139 type = s_typeCodeToCachedStorage[(int)qyTyp.TypeCode];
140 if (!qyTyp.IsStrict && type != typeof(IList<XPathNavigator>))
141 {
142 return typeof(IList<XPathItem>);
143 }
144 }
145 return type;
146 }
147}
static Type GetStorageType(XmlQueryType qyTyp)
static readonly Type[] s_typeCodeToStorage
static readonly Type[] s_typeCodeToCachedStorage