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

◆ GetTypeMapping()

TypeMapping System.Xml.Serialization.XmlReflectionImporter.GetTypeMapping ( string typeName,
string ns,
TypeDesc typeDesc,
NameTable typeLib,
Type type )
inlineprivate

Definition at line 694 of file XmlReflectionImporter.cs.

695 {
696 TypeMapping typeMapping = ((typeName != null && typeName.Length != 0) ? ((TypeMapping)typeLib[typeName, ns]) : ((type == null) ? null : ((TypeMapping)_anonymous[type])));
697 if (typeMapping == null)
698 {
699 return null;
700 }
701 if (!typeMapping.IsAnonymousType && typeMapping.TypeDesc != typeDesc)
702 {
703 throw new InvalidOperationException(System.SR.Format(System.SR.XmlTypesDuplicate, typeDesc.FullName, typeMapping.TypeDesc.FullName, typeName, ns));
704 }
705 return typeMapping;
706 }
static string Format(string resourceFormat, object p1)
Definition SR.cs:118
static string XmlTypesDuplicate
Definition SR.cs:1576
Definition SR.cs:7

References System.Xml.Serialization.XmlReflectionImporter._anonymous, System.Xml.Dictionary, System.SR.Format(), System.type, and System.SR.XmlTypesDuplicate.

Referenced by System.Xml.Serialization.XmlReflectionImporter.ImportEnumMapping(), System.Xml.Serialization.XmlReflectionImporter.ImportStructLikeMapping(), and System.Xml.Serialization.XmlReflectionImporter.ImportTypeMapping().