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

◆ InternalDeserializeInSharedTypeMode()

object System.Runtime.Serialization.XmlObjectSerializerReadContextComplex.InternalDeserializeInSharedTypeMode ( XmlReaderDelegator xmlReader,
int declaredTypeID,
Type declaredType,
string name,
string ns )
inlineprivateinherited

Definition at line 72 of file XmlObjectSerializerReadContextComplex.cs.

73 {
74 object retObj = null;
76 {
77 return retObj;
78 }
80 string clrType = attributes.ClrType;
81 DataContract dataContract2;
82 if (clrAssembly != null && clrType != null)
83 {
85 Type type;
87 if (dataContract == null)
88 {
89 if (assembly == null)
90 {
91 throw XmlObjectSerializer.CreateSerializationException(System.SR.Format(System.SR.AssemblyNotFound, clrAssembly));
92 }
93 throw XmlObjectSerializer.CreateSerializationException(System.SR.Format(System.SR.ClrTypeNotFound, assembly.FullName, clrType));
94 }
96 if (declaredType != null && declaredType.IsArray)
97 {
99 }
100 }
101 else
102 {
103 if (clrAssembly != null)
104 {
105 throw XmlObjectSerializer.CreateSerializationException(XmlObjectSerializer.TryAddLineInfo(xmlReader, System.SR.Format(System.SR.AttributeNotFound, "http://schemas.microsoft.com/2003/10/Serialization/", "Type", xmlReader.NodeType, xmlReader.NamespaceURI, xmlReader.LocalName)));
106 }
107 if (clrType != null)
108 {
109 throw XmlObjectSerializer.CreateSerializationException(XmlObjectSerializer.TryAddLineInfo(xmlReader, System.SR.Format(System.SR.AttributeNotFound, "http://schemas.microsoft.com/2003/10/Serialization/", "Assembly", xmlReader.NodeType, xmlReader.NamespaceURI, xmlReader.LocalName)));
110 }
111 if (declaredType == null)
112 {
113 throw XmlObjectSerializer.CreateSerializationException(XmlObjectSerializer.TryAddLineInfo(xmlReader, System.SR.Format(System.SR.AttributeNotFound, "http://schemas.microsoft.com/2003/10/Serialization/", "Type", xmlReader.NodeType, xmlReader.NamespaceURI, xmlReader.LocalName)));
114 }
116 }
118 }
DataContract ResolveDataContractInSharedTypeMode(string assemblyName, string typeName, out Assembly assembly, out Type type)
virtual object ReadDataContractValue(DataContract dataContract, XmlReaderDelegator reader)
bool TryHandleNullOrRef(XmlReaderDelegator reader, Type declaredType, string name, string ns, ref object retObj)
static string AssemblyNotFound
Definition SR.cs:616
static string Format(string resourceFormat, object p1)
Definition SR.cs:118
static string ClrTypeNotFound
Definition SR.cs:618
static string AttributeNotFound
Definition SR.cs:620
Definition SR.cs:7

References System.SR.AssemblyNotFound, System.SR.AttributeNotFound, System.Runtime.Serialization.XmlObjectSerializerReadContext.attributes, System.Runtime.Serialization.Attributes.ClrAssembly, System.Runtime.Serialization.Attributes.ClrType, System.SR.ClrTypeNotFound, System.Runtime.Serialization.XmlObjectSerializer.CreateSerializationException(), System.Runtime.Serialization.Dictionary, System.SR.Format(), System.Runtime.Serialization.XmlObjectSerializerContext.GetDataContract(), System.Runtime.Serialization.XmlObjectSerializerReadContext.ReadDataContractValue(), System.Runtime.Serialization.XmlObjectSerializerReadContextComplex.ResolveDataContractInSharedTypeMode(), System.Runtime.Serialization.XmlObjectSerializer.TryAddLineInfo(), System.Runtime.Serialization.XmlObjectSerializerReadContext.TryHandleNullOrRef(), and System.type.

Referenced by System.Runtime.Serialization.XmlObjectSerializerReadContextComplex.InternalDeserialize(), System.Runtime.Serialization.XmlObjectSerializerReadContextComplex.InternalDeserialize(), and System.Runtime.Serialization.XmlObjectSerializerReadContextComplex.InternalDeserialize().