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

◆ ImportElementType()

TypeMapping System.Xml.Serialization.XmlSchemaImporter.ImportElementType ( XmlSchemaElement element,
string identifier,
Type desiredMappingType,
Type baseType,
string ns )
inlineprivate

Definition at line 304 of file XmlSchemaImporter.cs.

305 {
306 TypeMapping typeMapping;
307 if (!element.SchemaTypeName.IsEmpty)
308 {
309 typeMapping = ImportType(element.SchemaTypeName, desiredMappingType, baseType, TypeFlags.CanBeElementValue, addref: false);
310 if (!typeMapping.ReferencedByElement)
311 {
312 object obj = FindType(element.SchemaTypeName, TypeFlags.CanBeElementValue);
314 while (xmlSchemaObject.Parent != null && obj != xmlSchemaObject)
315 {
317 }
319 }
320 }
321 else if (element.SchemaType == null)
322 {
324 }
325 else
326 {
329 }
330 if (!desiredMappingType.IsAssignableFrom(typeMapping.GetType()))
331 {
333 }
334 if (!typeMapping.TypeDesc.IsMappedType)
335 {
336 RunSchemaExtensions(typeMapping, element.SchemaTypeName, element.SchemaType, element, TypeFlags.CanBeElementValue);
337 }
338 return typeMapping;
339 }
static string Format(string resourceFormat, object p1)
Definition SR.cs:118
static string XmlElementImportedTwice
Definition SR.cs:1486
Definition SR.cs:7
MembersMapping ImportMembersType(XmlSchemaType type, string typeNs, string identifier)
TypeMapping ImportType(XmlQualifiedName name, Type desiredMappingType, Type baseType, TypeFlags flags, bool addref)
void RunSchemaExtensions(TypeMapping mapping, XmlQualifiedName qname, XmlSchemaType type, XmlSchemaObject context, TypeFlags flags)
TypeMapping ImportElementType(XmlSchemaElement element, string identifier, Type desiredMappingType, Type baseType, string ns)
XmlSchemaType FindType(XmlQualifiedName name, TypeFlags flags)
XmlSchemaElement FindElement(XmlQualifiedName name)
TypeMapping ImportDataType(XmlSchemaSimpleType dataType, string typeNs, string identifier, Type baseType, TypeFlags flags, bool isList)

References System.Xml.Dictionary, System.Xml.Serialization.XmlSchemaImporter.FindElement(), System.Xml.Serialization.XmlSchemaImporter.FindType(), System.SR.Format(), System.Xml.Serialization.XmlSchemaImporter.ImportDataType(), System.Xml.Serialization.XmlSchemaImporter.ImportElementType(), System.Xml.Serialization.XmlSchemaImporter.ImportMembersType(), System.Xml.Serialization.SchemaImporter.ImportRootMapping(), System.Xml.Serialization.XmlSchemaImporter.ImportType(), System.Xml.XmlQualifiedName.IsEmpty, System.Xml.Schema.XmlSchemaElement.Name, System.obj, System.Xml.Serialization.XmlSchemaImporter.RunSchemaExtensions(), System.Xml.Schema.XmlSchemaElement.SchemaType, System.Xml.Schema.XmlSchemaElement.SchemaTypeName, System.Xml.Schema.XmlSchemaElement.SubstitutionGroup, and System.SR.XmlElementImportedTwice.

Referenced by System.Xml.Serialization.XmlSchemaImporter.ImportElement(), and System.Xml.Serialization.XmlSchemaImporter.ImportElementType().