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

◆ ImportStructDataType()

StructMapping System.Xml.Serialization.XmlSchemaImporter.ImportStructDataType ( XmlSchemaSimpleType dataType,
string typeNs,
string identifier,
Type baseType )
inlineprivate

Definition at line 591 of file XmlSchemaImporter.cs.

592 {
593 identifier = Accessor.UnescapeName(identifier);
595 StructMapping structMapping = new StructMapping();
596 structMapping.IsReference = base.Schemas.IsReference(dataType);
597 TypeFlags flags = TypeFlags.Reference;
598 TypeDesc typeDesc = base.Scope.GetTypeDesc(baseType);
599 structMapping.TypeDesc = new TypeDesc(text, text, TypeKind.Struct, typeDesc, flags);
602 CodeIdentifiers codeIdentifiers = new CodeIdentifiers();
603 codeIdentifiers.AddReserved(text);
605 ImportTextMember(codeIdentifiers, new CodeIdentifiers(), null);
606 structMapping.Members = (MemberMapping[])codeIdentifiers.ToArray(typeof(MemberMapping));
608 base.Scope.AddTypeMapping(structMapping);
609 return structMapping;
610 }
void AddReservedIdentifiersForDataBinding(CodeIdentifiers scope)
void ImportTextMember(CodeIdentifiers members, CodeIdentifiers membersScope, XmlQualifiedName simpleContentType)
string GenerateUniqueTypeName(string desiredName, string ns)

References System.Xml.Serialization.SchemaImporter.AddReservedIdentifiersForDataBinding(), System.Xml.Dictionary, System.Xml.Serialization.XmlSchemaImporter.GenerateUniqueTypeName(), System.Xml.Serialization.XmlSchemaImporter.ImportTextMember(), System.text, and System.Xml.Serialization.Accessor.UnescapeName().

Referenced by System.Xml.Serialization.XmlSchemaImporter.ImportDataType().