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

◆ GetReflectionReadValueDelegate()

CollectionReadItemDelegate System.Runtime.Serialization.ReflectionReader.GetReflectionReadValueDelegate ( Type type)
inlineprivateinherited

Definition at line 269 of file ReflectionReader.cs.

270 {
271 int nullables = 0;
272 while (type.IsGenericType && type.GetGenericTypeDefinition() == Globals.TypeOfNullable)
273 {
274 nullables++;
275 type = type.GetGenericArguments()[0];
276 }
277 PrimitiveDataContract primitiveContract = PrimitiveDataContract.GetPrimitiveDataContract(type);
278 if ((primitiveContract != null && primitiveContract.UnderlyingType != Globals.TypeOfObject) || nullables != 0 || type.IsValueType)
279 {
281 }
283 [RequiresUnreferencedCode("Data Contract Serialization and Deserialization might require types that cannot be statically analyzed. Make sure all of the required types are preserved.")]
284 object GetReadItemOfPrimitiveTypeDelegate(XmlReaderDelegator xmlReader, XmlObjectSerializerReadContext context, CollectionDataContract collectionContract, Type itemType, string itemName, string itemNs)
285 {
287 }
288 }
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.Dictionary, System.Runtime.Serialization.PrimitiveDataContract.GetPrimitiveDataContract(), System.type, System.Runtime.Serialization.Globals.TypeOfNullable, and System.Runtime.Serialization.Globals.TypeOfObject.

Referenced by System.Runtime.Serialization.ReflectionReader.GetCollectionReadItemDelegate().