XsdDataContractImporter.GetCodeTypeReference Método

Definição

Retorna um CodeTypeReference para o elemento especificado.Returns a CodeTypeReference for the specified element.

Sobrecargas

GetCodeTypeReference(XmlQualifiedName)

Retorna um CodeTypeReference para o tipo CLR gerado para o tipo de esquema com o XmlQualifiedName especificado.Returns a CodeTypeReference to the CLR type generated for the schema type with the specified XmlQualifiedName.

GetCodeTypeReference(XmlQualifiedName, XmlSchemaElement)

Retorna um CodeTypeReference para o elemento XML qualificado e o elemento de esquema.Returns a CodeTypeReference for the specified XML qualified element and schema element.

GetCodeTypeReference(XmlQualifiedName)

Retorna um CodeTypeReference para o tipo CLR gerado para o tipo de esquema com o XmlQualifiedName especificado.Returns a CodeTypeReference to the CLR type generated for the schema type with the specified XmlQualifiedName.

public:
 System::CodeDom::CodeTypeReference ^ GetCodeTypeReference(System::Xml::XmlQualifiedName ^ typeName);
public System.CodeDom.CodeTypeReference GetCodeTypeReference (System.Xml.XmlQualifiedName typeName);
member this.GetCodeTypeReference : System.Xml.XmlQualifiedName -> System.CodeDom.CodeTypeReference
Public Function GetCodeTypeReference (typeName As XmlQualifiedName) As CodeTypeReference

Parâmetros

typeName
XmlQualifiedName

O XmlQualifiedName que especifica o tipo de esquema a ser procurado.The XmlQualifiedName that specifies the schema type to look up.

Retornos

CodeTypeReference

Uma referência CodeTypeReference ao tipo CLR gerado para o tipo de esquema com o typeName especificado.A CodeTypeReference reference to the CLR type generated for the schema type with the typeName specified.

Comentários

Use esse método para pesquisar a referência a um tipo CLR gerado depois de chamar o Import método.Use this method to look up the reference to a generated CLR type after calling the Import method. O CodeTypeReference contém o nome do tipo gerado e pode ser usado para pesquisar o correspondente CodeTypeDeclaration no CodeCompileUnit .The CodeTypeReference contains the name of the generated type and can be used to look up the corresponding CodeTypeDeclaration in the CodeCompileUnit.

Aplica-se a

GetCodeTypeReference(XmlQualifiedName, XmlSchemaElement)

Retorna um CodeTypeReference para o elemento XML qualificado e o elemento de esquema.Returns a CodeTypeReference for the specified XML qualified element and schema element.

public:
 System::CodeDom::CodeTypeReference ^ GetCodeTypeReference(System::Xml::XmlQualifiedName ^ typeName, System::Xml::Schema::XmlSchemaElement ^ element);
public System.CodeDom.CodeTypeReference GetCodeTypeReference (System.Xml.XmlQualifiedName typeName, System.Xml.Schema.XmlSchemaElement element);
member this.GetCodeTypeReference : System.Xml.XmlQualifiedName * System.Xml.Schema.XmlSchemaElement -> System.CodeDom.CodeTypeReference
Public Function GetCodeTypeReference (typeName As XmlQualifiedName, element As XmlSchemaElement) As CodeTypeReference

Parâmetros

typeName
XmlQualifiedName

Um XmlQualifiedName que especifica o nome XML qualificado do tipo de esquema de pesquisa.An XmlQualifiedName that specifies the XML qualified name of the schema type to look up.

element
XmlSchemaElement

Um XmlSchemaElement que especifica um elemento em um esquema XML.An XmlSchemaElement that specifies an element in an XML schema.

Retornos

CodeTypeReference

Um CodeTypeReference que representa o tipo que foi gerado para o tipo de esquema especificado.A CodeTypeReference that represents the type that was generated for the specified schema type.

Comentários

O elemento Schema é necessário para dados sobre o tipo especificado no escopo do elemento.The schema element is needed for data about the type that is specified at the element scope. O exemplo principal disso é o atributo XSD nillable .The main example of this is the XSD attribute nillable. Em esquema, nillable a configuração para true é especificada no elemento de esquema que o contém, enquanto o conceito de NULL é expresso no tipo CLR Nullable<T> .In schema, setting nillable to true is specified on the containing schema element whereas the concept of null is expressed in the CLR type Nullable<T>. O elemento é passado para que esse importador possa Pesquisar as informações em nível de elemento e retornar a referência de tipo correta de acordo.The element is passed in so that this importer can look up the element-level information and return the correct type reference accordingly.

Ao importar WSDL, cada parâmetro é importado separadamente e, portanto, os elementos de parâmetro precisam ser passados separadamente.When importing WSDL, each parameter is imported separately and therefore the parameter elements need to be passed in separately.

Aplica-se a