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

◆ ImportType() [2/2]

TypeMapping System.Xml.Serialization.XmlSchemaImporter.ImportType ( XmlSchemaComplexType type,
string typeNs,
string identifier,
Type desiredMappingType,
Type baseType,
TypeFlags flags )
inlineprivate

Definition at line 425 of file XmlSchemaImporter.cs.

426 {
427 if (type.Redefined != null)
428 {
429 throw new NotSupportedException(System.SR.Format(System.SR.XmlUnsupportedRedefine, type.Name, typeNs));
430 }
431 if (desiredMappingType == typeof(TypeMapping))
432 {
433 TypeMapping typeMapping = null;
434 if (baseType == null && (typeMapping = ImportArrayMapping(type, identifier, typeNs, repeats: false)) == null)
435 {
437 }
438 if (typeMapping == null)
439 {
441 if (typeMapping != null && type.Name != null && type.Name.Length != 0)
442 {
443 ImportDerivedTypes(new XmlQualifiedName(identifier, typeNs));
444 }
445 }
446 return typeMapping;
447 }
448 if (desiredMappingType == typeof(MembersMapping))
449 {
450 return ImportMembersType(type, typeNs, identifier);
451 }
452 throw new ArgumentException(System.SR.XmlInternalError, "desiredMappingType");
453 }
static string XmlInternalError
Definition SR.cs:1812
static string Format(string resourceFormat, object p1)
Definition SR.cs:118
static string XmlUnsupportedRedefine
Definition SR.cs:1706
Definition SR.cs:7
MembersMapping ImportMembersType(XmlSchemaType type, string typeNs, string identifier)
StructMapping ImportStructType(XmlSchemaType type, string typeNs, string identifier, Type baseType, bool arrayLike)
ArrayMapping ImportArrayMapping(XmlSchemaType type, string identifier, string ns, bool repeats)
override void ImportDerivedTypes(XmlQualifiedName baseName)
SpecialMapping ImportAnyMapping(XmlSchemaType type, string identifier, string ns, bool repeats)

References System.Xml.ArgumentException, System.Xml.Dictionary, System.SR.Format(), System.Xml.Serialization.XmlSchemaImporter.ImportAnyMapping(), System.Xml.Serialization.XmlSchemaImporter.ImportArrayMapping(), System.Xml.Serialization.XmlSchemaImporter.ImportDerivedTypes(), System.Xml.Serialization.XmlSchemaImporter.ImportMembersType(), System.Xml.Serialization.XmlSchemaImporter.ImportStructType(), System.type, System.SR.XmlInternalError, and System.SR.XmlUnsupportedRedefine.