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

interfaceType 不是由 typeInfo.

-或-

interfaceType 不引用接口。

-或-

typeInfointerfaceType 为打开的泛型类型。

-或-

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

typeInfo 表示泛型类型参数。

typeInfo TypeBuilder是尚未调用其CreateType()方法的实例。

-或-

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

适用于

另请参阅