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

◆ ExportEnumMapping()

XmlSchemaType System.Xml.Serialization.XmlSchemaExporter.ExportEnumMapping ( EnumMapping mapping,
string ns )
inlineprivate

Definition at line 1191 of file XmlSchemaExporter.cs.

1192 {
1193 if (!mapping.IncludeInSchema)
1194 {
1196 }
1198 if (xmlSchemaSimpleType == null)
1199 {
1203 if (!mapping.IsAnonymousType)
1204 {
1207 }
1209 xmlSchemaSimpleTypeRestriction.BaseTypeName = new XmlQualifiedName("string", "http://www.w3.org/2001/XMLSchema");
1210 for (int i = 0; i < mapping.Constants.Length; i++)
1211 {
1212 ConstantMapping constantMapping = mapping.Constants[i];
1216 }
1217 if (!mapping.IsFlags)
1218 {
1220 }
1221 else
1222 {
1228 }
1229 }
1230 if (!mapping.IsAnonymousType)
1231 {
1232 AddSchemaImport(mapping.Namespace, ns);
1233 }
1234 return xmlSchemaSimpleType;
1235 }
virtual void Add(object key, object? value)
Definition Hashtable.cs:676
static string Format(string resourceFormat, object p1)
Definition SR.cs:118
static string XmlCannotIncludeInSchema
Definition SR.cs:1580
Definition SR.cs:7
void AddSchemaImport(string ns, string referencingNs)
void AddSchemaItem(XmlSchemaObject item, string ns, string referencingNs)
void CheckForDuplicateType(TypeMapping mapping, string newNamespace)

References System.Xml.Serialization.XmlSchemaExporter._types, System.Collections.Hashtable.Add(), System.Xml.Serialization.XmlSchemaExporter.AddSchemaImport(), System.Xml.Serialization.XmlSchemaExporter.AddSchemaItem(), System.Xml.Serialization.XmlSchemaExporter.CheckForDuplicateType(), System.Xml.Dictionary, System.SR.Format(), and System.SR.XmlCannotIncludeInSchema.

Referenced by System.Xml.Serialization.XmlSchemaExporter.ExportAnonymousPrimitiveMapping(), and System.Xml.Serialization.XmlSchemaExporter.ExportPrimitiveMapping().