ModuleHandle.ResolveMethodHandle Metoda

Definicja

Zwraca uchwyt metody środowiska uruchomieniowego dla metody lub konstruktora zidentyfikowanego przez token metadanych.

Przeciążenia

ResolveMethodHandle(Int32)

Zwraca uchwyt metody środowiska uruchomieniowego dla metody lub konstruktora zidentyfikowanego przez określony token metadanych.

ResolveMethodHandle(Int32, RuntimeTypeHandle[], RuntimeTypeHandle[])

Zwraca uchwyt metody środowiska uruchomieniowego dla metody lub konstruktora zidentyfikowanego przez określony token metadanych, określając argumenty typu ogólnego typu i metody, w której token znajduje się w zakresie.

ResolveMethodHandle(Int32)

Zwraca uchwyt metody środowiska uruchomieniowego dla metody lub konstruktora zidentyfikowanego przez określony token metadanych.

public:
 RuntimeMethodHandle ResolveMethodHandle(int methodToken);
public RuntimeMethodHandle ResolveMethodHandle (int methodToken);
member this.ResolveMethodHandle : int -> RuntimeMethodHandle
Public Function ResolveMethodHandle (methodToken As Integer) As RuntimeMethodHandle

Parametry

methodToken
Int32

Token metadanych, który identyfikuje metodę lub konstruktor w module.

Zwraca

RuntimeMethodHandle

A RuntimeMethodHandle dla metody lub konstruktora zidentyfikowanego przez methodToken.

Wyjątki

methodToken nie jest prawidłowym tokenem metadanych dla metody w bieżącym module.

-lub- metadataToken nie jest tokenem dla metody lub konstruktora w zakresie bieżącego modułu.

-lub- metadataTokenMethodSpec to, którego podpis zawiera typ var elementu lub mvar.

Metoda jest wywoływana na pustym dojściu metody.

Uwagi

Aby rozpoznać token metadanych dla elementu, którego MethodSpec podpis zawiera typ var elementu lub mvar, użyj ResolveMethodHandle(Int32, RuntimeTypeHandle[], RuntimeTypeHandle[]) przeciążenia metody, która umożliwia podanie niezbędnego kontekstu.

Uwaga

Informacje o tokenach metadanych można znaleźć w dokumentacji infrastruktury języka wspólnego (CLI), zwłaszcza "Partition II: Metadata Definition and Semantics".

Dotyczy

ResolveMethodHandle(Int32, RuntimeTypeHandle[], RuntimeTypeHandle[])

Zwraca uchwyt metody środowiska uruchomieniowego dla metody lub konstruktora zidentyfikowanego przez określony token metadanych, określając argumenty typu ogólnego typu i metody, w której token znajduje się w zakresie.

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

Parametry

methodToken
Int32

Token metadanych, który identyfikuje metodę lub konstruktor w module.

typeInstantiationContext
RuntimeTypeHandle[]

Tablica RuntimeTypeHandle struktur reprezentujących argumenty typu ogólnego typu, w którym token znajduje się w zakresie, lub null jeśli ten typ nie jest ogólny.

methodInstantiationContext
RuntimeTypeHandle[]

Tablica RuntimeTypeHandle struktur reprezentujących argumenty typu ogólnego metody, w której token znajduje się w zakresie, lub null jeśli ta metoda nie jest ogólna.

Zwraca

RuntimeMethodHandle

A RuntimeMethodHandle dla metody lub konstruktora zidentyfikowanego przez methodToken.

Wyjątki

methodToken nie jest prawidłowym tokenem metadanych dla metody w bieżącym module.

-lub- metadataToken nie jest tokenem dla metody lub konstruktora w zakresie bieżącego modułu.

-lub- metadataTokenMethodSpec to, którego podpis zawiera typ var elementu lub mvar.

Metoda jest wywoływana na pustym dojściu metody.

methodToken nie jest prawidłowym tokenem.

Uwagi

Uwaga

Informacje o tokenach metadanych można znaleźć w dokumentacji infrastruktury języka wspólnego (CLI), zwłaszcza "Partition II: Metadata Definition and Semantics".

Dotyczy