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

◆ XmlILStorageMethods()

System.Xml.Xsl.IlGen.XmlILStorageMethods.XmlILStorageMethods ( Type storageType)
inline

Definition at line 52 of file XmlILStorageMethods.cs.

53 {
54 Type type = null;
55 if (storageType == typeof(int))
56 {
58 }
59 else if (storageType == typeof(long))
60 {
62 }
63 else if (storageType == typeof(decimal))
64 {
66 }
67 else if (storageType == typeof(double))
68 {
70 }
71 if (type != null)
72 {
73 AggAvg = type.GetMethod("Average");
74 AggAvgResult = type.GetMethod("get_AverageResult");
75 AggCreate = type.GetMethod("Create");
76 AggIsEmpty = type.GetMethod("get_IsEmpty");
77 AggMax = type.GetMethod("Maximum");
78 AggMaxResult = type.GetMethod("get_MaximumResult");
79 AggMin = type.GetMethod("Minimum");
80 AggMinResult = type.GetMethod("get_MinimumResult");
81 AggSum = type.GetMethod("Sum");
82 AggSumResult = type.GetMethod("get_SumResult");
83 }
84 Type type2;
86 {
88 SeqAdd = type2.GetMethod("AddClone");
89 }
90 else if (storageType == typeof(XPathItem))
91 {
93 SeqAdd = type2.GetMethod("AddClone");
94 }
95 else
96 {
97 type2 = typeof(XmlQuerySequence<>).MakeGenericType(storageType);
98 SeqAdd = type2.GetMethod("Add");
99 }
100 FieldInfo field = type2.GetField("Empty");
101 SeqEmpty = field;
102 SeqReuse = type2.GetMethod("CreateOrReuse", new Type[1] { type2 });
103 SeqReuseSgl = type2.GetMethod("CreateOrReuse", new Type[2] { type2, storageType });
104 SeqSortByKeys = type2.GetMethod("SortByKeys");
105 SeqType = type2;
106 Type type3 = typeof(IList<>).MakeGenericType(storageType);
107 IListItem = type3.GetMethod("get_Item");
109 IListCount = typeof(ICollection<>).MakeGenericType(storageType).GetMethod("get_Count");
110 if (storageType == typeof(string))
111 {
112 ValueAs = typeof(XPathItem).GetMethod("get_Value");
113 }
114 else if (storageType == typeof(int))
115 {
116 ValueAs = typeof(XPathItem).GetMethod("get_ValueAsInt");
117 }
118 else if (storageType == typeof(long))
119 {
120 ValueAs = typeof(XPathItem).GetMethod("get_ValueAsLong");
121 }
122 else if (storageType == typeof(DateTime))
123 {
124 ValueAs = typeof(XPathItem).GetMethod("get_ValueAsDateTime");
125 }
126 else if (storageType == typeof(double))
127 {
128 ValueAs = typeof(XPathItem).GetMethod("get_ValueAsDouble");
129 }
130 else if (storageType == typeof(bool))
131 {
132 ValueAs = typeof(XPathItem).GetMethod("get_ValueAsBoolean");
133 }
134 if (storageType == typeof(byte[]))
135 {
136 ToAtomicValue = typeof(XmlILStorageConverter).GetMethod("BytesToAtomicValue");
137 }
139 {
140 ToAtomicValue = typeof(XmlILStorageConverter).GetMethod(storageType.Name + "ToAtomicValue");
141 }
142 }

References System.Xml.Xsl.IlGen.XmlILStorageMethods.AggAvg, System.Xml.Xsl.IlGen.XmlILStorageMethods.AggAvgResult, System.Xml.Xsl.IlGen.XmlILStorageMethods.AggCreate, System.Xml.Xsl.IlGen.XmlILStorageMethods.AggIsEmpty, System.Xml.Xsl.IlGen.XmlILStorageMethods.AggMax, System.Xml.Xsl.IlGen.XmlILStorageMethods.AggMaxResult, System.Xml.Xsl.IlGen.XmlILStorageMethods.AggMin, System.Xml.Xsl.IlGen.XmlILStorageMethods.AggMinResult, System.Xml.Xsl.IlGen.XmlILStorageMethods.AggSum, System.Xml.Xsl.IlGen.XmlILStorageMethods.AggSumResult, System.Xml.Dictionary, System.Xml.Xsl.IlGen.XmlILStorageMethods.IListCount, System.Xml.Xsl.IlGen.XmlILStorageMethods.IListItem, System.Xml.Xsl.IlGen.XmlILStorageMethods.IListType, System.Xml.Xsl.IlGen.XmlILStorageMethods.SeqAdd, System.Xml.Xsl.IlGen.XmlILStorageMethods.SeqEmpty, System.Xml.Xsl.IlGen.XmlILStorageMethods.SeqReuse, System.Xml.Xsl.IlGen.XmlILStorageMethods.SeqReuseSgl, System.Xml.Xsl.IlGen.XmlILStorageMethods.SeqSortByKeys, System.Xml.Xsl.IlGen.XmlILStorageMethods.SeqType, System.Xml.Xsl.IlGen.XmlILStorageMethods.ToAtomicValue, System.type, and System.Xml.Xsl.IlGen.XmlILStorageMethods.ValueAs.