ModuleHandle.ResolveTypeHandle 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
返回由元数据令牌标识的类型的运行时类型句柄。
重载
| 名称 | 说明 |
|---|---|
| ResolveTypeHandle(Int32) |
返回由指定元数据令牌标识的类型的运行时类型句柄。 |
| ResolveTypeHandle(Int32, RuntimeTypeHandle[], RuntimeTypeHandle[]) |
返回由指定元数据令牌标识的类型的运行时类型句柄,并指定令牌所在的类型和方法的泛型类型参数。 |
ResolveTypeHandle(Int32)
- Source:
- RuntimeHandles.cs
- Source:
- RuntimeHandles.cs
- Source:
- RuntimeHandles.cs
- Source:
- RuntimeHandles.cs
- Source:
- RuntimeHandles.cs
返回由指定元数据令牌标识的类型的运行时类型句柄。
public:
RuntimeTypeHandle ResolveTypeHandle(int typeToken);
[System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("Trimming changes metadata tokens")]
public RuntimeTypeHandle ResolveTypeHandle(int typeToken);
public RuntimeTypeHandle ResolveTypeHandle(int typeToken);
[<System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("Trimming changes metadata tokens")>]
member this.ResolveTypeHandle : int -> RuntimeTypeHandle
member this.ResolveTypeHandle : int -> RuntimeTypeHandle
Public Function ResolveTypeHandle (typeToken As Integer) As RuntimeTypeHandle
参数
- typeToken
- Int32
标识模块中的类型的元数据令牌。
返回
由 .标识RuntimeTypeHandle的类型的 AtypeToken。
- 属性
例外
typeToken 不是当前模块中类型的有效元数据令牌。
-或-
typeToken 不是当前模块范围内的类型的令牌。
-或-
typeToken
TypeSpec是其签名包含元素类型var或 mvar.
该方法在空类型句柄上调用。
注解
若要解析其签名包含元素类型的TypeSpec元数据令牌var,或者mvar,请使用ResolveTypeHandle(Int32, RuntimeTypeHandle[], RuntimeTypeHandle[])方法重载,以便提供必要的上下文。
注释
可以在 公共语言基础结构(CLI)文档中找到有关元数据令牌的信息,尤其是“分区 II:元数据定义和语义”。
适用于
ResolveTypeHandle(Int32, RuntimeTypeHandle[], RuntimeTypeHandle[])
- Source:
- RuntimeHandles.cs
- Source:
- RuntimeHandles.cs
- Source:
- RuntimeHandles.cs
- Source:
- RuntimeHandles.cs
- Source:
- RuntimeHandles.cs
返回由指定元数据令牌标识的类型的运行时类型句柄,并指定令牌所在的类型和方法的泛型类型参数。
public:
RuntimeTypeHandle ResolveTypeHandle(int typeToken, cli::array <RuntimeTypeHandle> ^ typeInstantiationContext, cli::array <RuntimeTypeHandle> ^ methodInstantiationContext);
[System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("Trimming changes metadata tokens")]
public RuntimeTypeHandle ResolveTypeHandle(int typeToken, RuntimeTypeHandle[]? typeInstantiationContext, RuntimeTypeHandle[]? methodInstantiationContext);
public RuntimeTypeHandle ResolveTypeHandle(int typeToken, RuntimeTypeHandle[]? typeInstantiationContext, RuntimeTypeHandle[]? methodInstantiationContext);
public RuntimeTypeHandle ResolveTypeHandle(int typeToken, RuntimeTypeHandle[] typeInstantiationContext, RuntimeTypeHandle[] methodInstantiationContext);
[<System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("Trimming changes metadata tokens")>]
member this.ResolveTypeHandle : int * RuntimeTypeHandle[] * RuntimeTypeHandle[] -> RuntimeTypeHandle
member this.ResolveTypeHandle : int * RuntimeTypeHandle[] * RuntimeTypeHandle[] -> RuntimeTypeHandle
Public Function ResolveTypeHandle (typeToken As Integer, typeInstantiationContext As RuntimeTypeHandle(), methodInstantiationContext As RuntimeTypeHandle()) As RuntimeTypeHandle
参数
- typeToken
- Int32
标识模块中的类型的元数据令牌。
- typeInstantiationContext
- RuntimeTypeHandle[]
表示令牌所在范围的类型的泛型类型参数的结构数组 RuntimeTypeHandle ,或者 null 该类型不是泛型类型。
- methodInstantiationContext
- RuntimeTypeHandle[]
结构对象的数组 RuntimeTypeHandle ,这些对象表示令牌所在范围内的方法的泛型类型参数,或者 null 该方法不是泛型方法。
返回
由 .标识RuntimeTypeHandle的类型的 AtypeToken。
- 属性
例外
typeToken 不是当前模块中类型的有效元数据令牌。
-或-
typeToken 不是当前模块范围内的类型的令牌。
-或-
typeToken
TypeSpec是其签名包含元素类型var或 mvar.
该方法在空类型句柄上调用。
typeToken 不是有效的令牌。
注解
注释
可以在 公共语言基础结构(CLI)文档中找到有关元数据令牌的信息,尤其是“分区 II:元数据定义和语义”。