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

◆ ExportXmlDataContract()

void System.Runtime.Serialization.SchemaExporter.ExportXmlDataContract ( XmlDataContract dataContract)
inlineprivate

Definition at line 693 of file SchemaExporter.cs.

694 {
695 Type underlyingType = dataContract.UnderlyingType;
697 {
699 }
700 if (hasRoot)
701 {
702 typeName.Equals(dataContract.StableName);
703 if (SchemaHelper.GetSchemaElement(Schemas, new XmlQualifiedName(dataContract.TopLevelElementName.Value, dataContract.TopLevelElementNamespace.Value), out var outSchema) == null)
704 {
706 xmlSchemaElement.IsNillable = dataContract.IsTopLevelElementNullable;
708 }
710 xsdType = SchemaHelper.GetSchemaType(_schemas, typeName, out outSchema);
711 if (xmlSchemaType == null && xsdType == null && typeName.Namespace != "http://www.w3.org/2001/XMLSchema")
712 {
713 throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidDataContractException(System.SR.Format(System.SR.MissingSchemaType, typeName, DataContract.GetClrTypeFullName(underlyingType))));
714 }
715 if (xsdType != null)
716 {
718 }
719 }
720 }
XmlElement GetAnnotationMarkup(XmlQualifiedName annotationQualifiedName, string innerText, XmlSchema schema)
static bool InvokeSchemaProviderMethod(Type clrType, XmlSchemaSet schemas, out XmlQualifiedName stableName, out XmlSchemaType xsdType, out bool hasRoot)
XmlSchemaElement ExportTopLevelElement(DataContract dataContract, XmlSchema schema)
static bool IsSpecialXmlType(Type type, [NotNullWhen(true)] out XmlQualifiedName typeName, [NotNullWhen(true)] out XmlSchemaType xsdType, out bool hasRoot)
static void InvokeGetSchemaMethod([DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicParameterlessConstructor)] Type clrType, XmlSchemaSet schemas, XmlQualifiedName stableName)
XmlSchemaAnnotation GetSchemaAnnotation(XmlQualifiedName annotationQualifiedName, string innerText, XmlSchema schema)
static void ReprocessAll(XmlSchemaSet schemas)
static string Format(string resourceFormat, object p1)
Definition SR.cs:118
static string MissingSchemaType
Definition SR.cs:682
Definition SR.cs:7
static string ToString(bool value)

References System.Runtime.Serialization.SchemaExporter._schemas, System.Runtime.Serialization.Dictionary, System.Runtime.Serialization.SchemaExporter.ExportSurrogateData(), System.Runtime.Serialization.SchemaExporter.ExportTopLevelElement(), System.SR.Format(), System.Runtime.Serialization.SchemaExporter.GetAnnotationMarkup(), System.Runtime.Serialization.DataContract.GetClrTypeFullName(), System.Runtime.Serialization.SchemaExporter.GetSchemaAnnotation(), System.Runtime.Serialization.SchemaHelper.GetSchemaElement(), System.Runtime.Serialization.SchemaHelper.GetSchemaType(), System.Runtime.Serialization.SchemaExporter.InvokeGetSchemaMethod(), System.Runtime.Serialization.SchemaExporter.InvokeSchemaProviderMethod(), System.Runtime.Serialization.SchemaExporter.IsSpecialXmlType(), System.Runtime.Serialization.SchemaExporter.IsValueTypeName, System.SR.MissingSchemaType, System.Runtime.Serialization.SchemaExporter.ReprocessAll(), System.Runtime.Serialization.SchemaExporter.Schemas, System.Runtime.Serialization.DiagnosticUtility.ExceptionUtility.ThrowHelperError(), and System.Xml.XmlConvert.ToString().

Referenced by System.Runtime.Serialization.SchemaExporter.ExportDataContract().