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

◆ MakeDerived()

void System.Xml.Serialization.SchemaImporter.MakeDerived ( StructMapping structMapping,
Type baseType,
bool baseTypeCanBeIndirect )
inlinepackageinherited

Definition at line 112 of file SchemaImporter.cs.

113 {
115 if (!(baseType != null))
116 {
117 return;
118 }
120 if (typeDesc == null)
121 {
122 return;
123 }
126 {
127 while (typeDesc2.BaseTypeDesc != null && typeDesc2.BaseTypeDesc != typeDesc)
128 {
129 typeDesc2 = typeDesc2.BaseTypeDesc;
130 }
131 }
132 if (typeDesc2.BaseTypeDesc != null && typeDesc2.BaseTypeDesc != typeDesc)
133 {
134 throw new InvalidOperationException(System.SR.Format(System.SR.XmlInvalidBaseType, structMapping.TypeDesc.FullName, baseType.FullName, typeDesc2.BaseTypeDesc.FullName));
135 }
137 }
static string Format(string resourceFormat, object p1)
Definition SR.cs:118
static string XmlInvalidBaseType
Definition SR.cs:1604
Definition SR.cs:7
TypeDesc(string name, string fullName, XmlSchemaType dataType, TypeKind kind, TypeDesc baseTypeDesc, TypeFlags flags, string formatterName)
Definition TypeDesc.cs:219
TypeDesc GetTypeDesc(string name, string ns)
Definition TypeScope.cs:224

References System.Xml.Serialization.TypeDesc.TypeDesc(), System.Xml.Dictionary, System.SR.Format(), System.Xml.Serialization.TypeScope.GetTypeDesc(), System.Xml.Serialization.SchemaImporter.Scope, and System.SR.XmlInvalidBaseType.

Referenced by System.Xml.Serialization.XmlSchemaImporter.ImportDerivedTypeMapping(), System.Xml.Serialization.XmlSchemaImporter.ImportMembersMapping(), and System.Xml.Serialization.XmlSchemaImporter.ImportSchemaType().