XsdDataContractExporter.GetSchemaType(Type) Metodo

Definizione

Restituisce il tipo di XML Schema per il tipo specificato.

public:
 System::Xml::Schema::XmlSchemaType ^ GetSchemaType(Type ^ type);
[System.Diagnostics.CodeAnalysis.RequiresDynamicCode("Data Contract Serialization and Deserialization might require types that cannot be statically analyzed.")]
[System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("Data Contract Serialization and Deserialization might require types that cannot be statically analyzed. Make sure all of the required types are preserved.")]
public System.Xml.Schema.XmlSchemaType? GetSchemaType(Type type);
public System.Xml.Schema.XmlSchemaType? GetSchemaType(Type type);
[System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("Data Contract Serialization and Deserialization might require types that cannot be statically analyzed. Make sure all of the required types are preserved.")]
public System.Xml.Schema.XmlSchemaType? GetSchemaType(Type type);
public System.Xml.Schema.XmlSchemaType GetSchemaType(Type type);
[<System.Diagnostics.CodeAnalysis.RequiresDynamicCode("Data Contract Serialization and Deserialization might require types that cannot be statically analyzed.")>]
[<System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("Data Contract Serialization and Deserialization might require types that cannot be statically analyzed. Make sure all of the required types are preserved.")>]
member this.GetSchemaType : Type -> System.Xml.Schema.XmlSchemaType
member this.GetSchemaType : Type -> System.Xml.Schema.XmlSchemaType
[<System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("Data Contract Serialization and Deserialization might require types that cannot be statically analyzed. Make sure all of the required types are preserved.")>]
member this.GetSchemaType : Type -> System.Xml.Schema.XmlSchemaType
Public Function GetSchemaType (type As Type) As XmlSchemaType

Parametri

type
Type

Tipo per cui restituire uno schema.

Valori restituiti

Oggetto XmlSchemaType contenente lo schema XML.

Attributi

Eccezioni

L'argomento type è null.

Commenti

Lo scopo principale di questo metodo è consentire la rappresentare di tipi anonimi in XML Schema. Poiché i tipi anonimi non hanno un nome di contratto e uno spazio dei nomi, non possono essere cercati usando .GetSchemaTypeName Questo metodo restituisce la XmlSchemaType definizione per tali tipi. Tipi per i quali il GetSchemaTypeName metodo restituisce un nome valido, questo metodo restituisce null.

Si applica a