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

◆ ReflectionReadValue() [2/2]

object System.Runtime.Serialization.ReflectionReader.ReflectionReadValue ( XmlReaderDelegator xmlReader,
XmlObjectSerializerReadContext context,
Type type,
string name,
string ns,
PrimitiveDataContract primitiveContractForOriginalType = null )
inlineprotectedinherited

Definition at line 208 of file ReflectionReader.cs.

209 {
210 object obj = null;
211 int num = 0;
212 while (type.IsGenericType && type.GetGenericTypeDefinition() == Globals.TypeOfNullable)
213 {
214 num++;
215 type = type.GetGenericArguments()[0];
216 }
217 PrimitiveDataContract primitiveDataContract = ((num != 0) ? PrimitiveDataContract.GetPrimitiveDataContract(type) : (primitiveContractForOriginalType ?? PrimitiveDataContract.GetPrimitiveDataContract(type)));
218 if ((primitiveDataContract != null && primitiveDataContract.UnderlyingType != Globals.TypeOfObject) || num != 0 || type.IsValueType)
219 {
220 return ReadItemOfPrimitiveType(xmlReader, context, type, name, ns, primitiveDataContract, num);
221 }
222 return ReflectionInternalDeserialize(xmlReader, context, null, type, name, ns);
223 }
object ReflectionInternalDeserialize(XmlReaderDelegator xmlReader, XmlObjectSerializerReadContext context, CollectionDataContract collectionContract, Type type, string name, string ns)
object ReadItemOfPrimitiveType(XmlReaderDelegator xmlReader, XmlObjectSerializerReadContext context, Type type, string name, string ns, PrimitiveDataContract primitiveContract, int nullables)

References System.Runtime.Serialization.PrimitiveDataContract.GetPrimitiveDataContract(), System.obj, System.type, System.Runtime.Serialization.Globals.TypeOfNullable, and System.Runtime.Serialization.Globals.TypeOfObject.

Referenced by System.Runtime.Serialization.Json.ReflectionJsonReader.ReadSimpleDictionary().