RuntimeReflectionExtensions.GetRuntimeInterfaceMap(TypeInfo, Type) Metod

Definition

Returnerar en gränssnittsmappning för den angivna typen och det angivna gränssnittet.

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

Parametrar

typeInfo
TypeInfo

Den typ som du vill hämta en mappning för.

interfaceType
Type

Gränssnittet som du vill hämta en mappning för.

Returer

Ett objekt som representerar gränssnittsmappningen för det angivna gränssnittet och typen.

Undantag

typeInfo är null.

-eller-

interfaceType är null.

interfaceType implementeras inte av typeInfo.

-eller-

interfaceType refererar inte till ett gränssnitt.

-eller-

typeInfo eller interfaceType är en öppen allmän typ.

-eller-

interfaceType är ett allmänt gränssnitt och typeInfo är en matristyp.

typeInfo representerar en allmän typparameter.

typeInfo är en TypeBuilder instans vars CreateType() metod ännu inte har anropats.

-eller-

Den anropade metoden stöds inte i basklassen. Härledda klasser måste tillhandahålla en implementering.

Gäller för

Se även