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

◆ GetArraySource() [2/2]

string System.Xml.Serialization.XmlSerializationReaderILGen.GetArraySource ( TypeDesc typeDesc,
string arrayName,
bool multiRef )
inlineprivate

Definition at line 2148 of file XmlSerializationReaderILGen.cs.

2149 {
2150 string text = "c" + arrayName;
2151 string text2 = "";
2152 if (multiRef)
2153 {
2154 text2 = "soap = (System.Object[])EnsureArrayIndex(soap, " + text + "+2, typeof(System.Object)); ";
2155 }
2156 if (typeDesc.IsArray)
2157 {
2158 string cSharpName = typeDesc.ArrayElementTypeDesc.CSharpName;
2159 string text3 = "(" + cSharpName + "[])";
2160 text2 = text2 + arrayName + " = " + text3 + "EnsureArrayIndex(" + arrayName + ", " + text + ", " + base.RaCodeGen.GetStringForTypeof(cSharpName) + ");";
2161 string stringForArrayMember = base.RaCodeGen.GetStringForArrayMember(arrayName, text + "++", typeDesc);
2162 if (multiRef)
2163 {
2164 text2 = text2 + " soap[1] = " + arrayName + ";";
2165 text2 = text2 + " if (ReadReference(out soap[" + text + "+2])) " + stringForArrayMember + " = null; else ";
2166 }
2167 return text2 + stringForArrayMember;
2168 }
2169 return base.RaCodeGen.GetStringForMethod(arrayName, typeDesc.CSharpName, "Add");
2170 }

References System.Xml.Dictionary, and System.text.