RuntimeReflectionExtensions.GetRuntimeInterfaceMap(TypeInfo, Type) 方法

定义

返回指定类型和指定接口的接口映射。

public:
[System::Runtime::CompilerServices::Extension]
 static System::Reflection::InterfaceMapping GetRuntimeInterfaceMap(System::Reflection::TypeInfo ^ typeInfo, Type ^ interfaceType);
public static System.Reflection.InterfaceMapping GetRuntimeInterfaceMap (this System.Reflection.TypeInfo typeInfo, Type interfaceType);
static member GetRuntimeInterfaceMap : System.Reflection.TypeInfo * Type -> System.Reflection.InterfaceMapping
<Extension()>
Public Function GetRuntimeInterfaceMap (typeInfo As TypeInfo, interfaceType As Type) As InterfaceMapping

参数

typeInfo
TypeInfo

要检索其映射的类型。

interfaceType
Type

要检索其映射的接口。

返回

表示指定接口和类型的接口映射的对象。

例外

typeInfonull

- 或 -

interfaceTypenull

typeInfo 未实现 interfaceType

- 或 -

interfaceType 不引用接口。

- 或 -

typeInfointerfaceType 为开放式泛型类型。

- 或 -

interfaceType 是一个泛型接口,而 typeInfo 是一个数组类型。

typeInfo 表示泛型类型参数。

typeInfo 是尚未调用其 CreateType() 方法的 TypeBuilder 接口。

- 或 -

基类不支持调用的方法。 派生类必须提供一个实现。

适用于

另请参阅