ModuleHandle.ResolveTypeHandle Método

Definição

Retorna um identificador de tipo de runtime de um tipo identificado por um token de metadados.Returns a runtime type handle for a type identified by a metadata token.

Sobrecargas

ResolveTypeHandle(Int32)

Retorna um identificador de tipo de runtime do tipo identificado pelo token de metadados especificado.Returns a runtime type handle for the type identified by the specified metadata token.

ResolveTypeHandle(Int32, RuntimeTypeHandle[], RuntimeTypeHandle[])

Retorna um identificador de tipo de runtime do tipo identificado pelo token de metadados especificado, especificando os argumentos de tipo genérico do tipo e do método em que o token está no escopo.Returns a runtime type handle for the type identified by the specified metadata token, specifying the generic type arguments of the type and method where the token is in scope.

ResolveTypeHandle(Int32)

Retorna um identificador de tipo de runtime do tipo identificado pelo token de metadados especificado.Returns a runtime type handle for the type identified by the specified metadata token.

public:
 RuntimeTypeHandle ResolveTypeHandle(int typeToken);
public RuntimeTypeHandle ResolveTypeHandle (int typeToken);
member this.ResolveTypeHandle : int -> RuntimeTypeHandle
Public Function ResolveTypeHandle (typeToken As Integer) As RuntimeTypeHandle

Parâmetros

typeToken
Int32

Um token de metadados que identifica um tipo no módulo.A metadata token that identifies a type in the module.

Retornos

RuntimeTypeHandle

Um RuntimeTypeHandle do tipo identificado pelo typeToken.A RuntimeTypeHandle for the type identified by typeToken.

Exceções

typeToken não é um token de metadados válido para um tipo no módulo atual.typeToken is not a valid metadata token for a type in the current module.

- ou --or- metadataToken não é um token para um tipo no escopo do módulo atual.metadataToken is not a token for a type in the scope of the current module.

- ou --or- metadataToken é um TypeSpec cuja assinatura contém o tipo de elemento var ou mvar.metadataToken is a TypeSpec whose signature contains element type var or mvar.

O método é chamado em um identificador de tipo vazio.The method is called on an empty type handle.

Comentários

Para resolver um token de metadados para uma TypeSpec cuja assinatura contém o tipo de elemento var ou mvar , use a ResolveTypeHandle(Int32, RuntimeTypeHandle[], RuntimeTypeHandle[]) sobrecarga do método, que permite que você forneça o contexto necessário.To resolve a metadata token for a TypeSpec whose signature contains element type var or mvar, use the ResolveTypeHandle(Int32, RuntimeTypeHandle[], RuntimeTypeHandle[]) method overload, which allows you to supply the necessary context.

Observação

Informações sobre tokens de metadados podem ser encontradas na documentação do Common Language Infrastructure (CLI), especialmente "partição II: definição de metadados e semântica".Information about metadata tokens can be found in the Common Language Infrastructure (CLI) documentation, especially "Partition II: Metadata Definition and Semantics". A documentação está disponível online; confira ECMA C# and Common Language Infrastructure Standards, no MSDN, e Standard ECMA-335 - Common Language Infrastructure (CLI), no site internacional da Ecma.The documentation is available online; see ECMA C# and Common Language Infrastructure Standards on MSDN and Standard ECMA-335 - Common Language Infrastructure (CLI) on the Ecma International Web site.

Aplica-se a

ResolveTypeHandle(Int32, RuntimeTypeHandle[], RuntimeTypeHandle[])

Retorna um identificador de tipo de runtime do tipo identificado pelo token de metadados especificado, especificando os argumentos de tipo genérico do tipo e do método em que o token está no escopo.Returns a runtime type handle for the type identified by the specified metadata token, specifying the generic type arguments of the type and method where the token is in scope.

public:
 RuntimeTypeHandle ResolveTypeHandle(int typeToken, cli::array <RuntimeTypeHandle> ^ typeInstantiationContext, cli::array <RuntimeTypeHandle> ^ methodInstantiationContext);
public RuntimeTypeHandle ResolveTypeHandle (int typeToken, RuntimeTypeHandle[]? typeInstantiationContext, RuntimeTypeHandle[]? methodInstantiationContext);
public RuntimeTypeHandle ResolveTypeHandle (int typeToken, RuntimeTypeHandle[] typeInstantiationContext, RuntimeTypeHandle[] methodInstantiationContext);
member this.ResolveTypeHandle : int * RuntimeTypeHandle[] * RuntimeTypeHandle[] -> RuntimeTypeHandle
Public Function ResolveTypeHandle (typeToken As Integer, typeInstantiationContext As RuntimeTypeHandle(), methodInstantiationContext As RuntimeTypeHandle()) As RuntimeTypeHandle

Parâmetros

typeToken
Int32

Um token de metadados que identifica um tipo no módulo.A metadata token that identifies a type in the module.

typeInstantiationContext
RuntimeTypeHandle[]

Uma matriz de estruturas RuntimeTypeHandle que representam os argumentos de tipo genérico do tipo em que o token está no escopo ou null se esse tipo não for genérico.An array of RuntimeTypeHandle structures representing the generic type arguments of the type where the token is in scope, or null if that type is not generic.

methodInstantiationContext
RuntimeTypeHandle[]

Uma matriz de objetos de estruturas RuntimeTypeHandle que representam os argumentos de tipo genérico do método em que o token está no escopo ou null se esse método não for genérico.An array of RuntimeTypeHandle structures objects representing the generic type arguments of the method where the token is in scope, or null if that method is not generic.

Retornos

RuntimeTypeHandle

Um RuntimeTypeHandle do tipo identificado pelo typeToken.A RuntimeTypeHandle for the type identified by typeToken.

Exceções

typeToken não é um token de metadados válido para um tipo no módulo atual.typeToken is not a valid metadata token for a type in the current module.

- ou --or- metadataToken não é um token para um tipo no escopo do módulo atual.metadataToken is not a token for a type in the scope of the current module.

- ou --or- metadataToken é um TypeSpec cuja assinatura contém o tipo de elemento var ou mvar.metadataToken is a TypeSpec whose signature contains element type var or mvar.

O método é chamado em um identificador de tipo vazio.The method is called on an empty type handle.

typeToken não é um token válido.typeToken is not a valid token.

Comentários

Observação

Informações sobre tokens de metadados podem ser encontradas na documentação do Common Language Infrastructure (CLI), especialmente "partição II: definição de metadados e semântica".Information about metadata tokens can be found in the Common Language Infrastructure (CLI) documentation, especially "Partition II: Metadata Definition and Semantics". A documentação está disponível online; confira ECMA C# and Common Language Infrastructure Standards, no MSDN, e Standard ECMA-335 - Common Language Infrastructure (CLI), no site internacional da Ecma.The documentation is available online; see ECMA C# and Common Language Infrastructure Standards on MSDN and Standard ECMA-335 - Common Language Infrastructure (CLI) on the Ecma International Web site.

Aplica-se a