XsdDataContractExporter.GetSchemaType(Type) Metodo
Definizione
Importante
Alcune informazioni sono relative alla release non definitiva del prodotto, che potrebbe subire modifiche significative prima della release definitiva. Microsoft non riconosce alcuna garanzia, espressa o implicita, in merito alle informazioni qui fornite.
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.