ExecutionContext.Run(ExecutionContext, ContextCallback, Object) Metoda

Definicja

Uruchamia metodę w określonym kontekście wykonywania w bieżącym wątku.

public:
 static void Run(System::Threading::ExecutionContext ^ executionContext, System::Threading::ContextCallback ^ callback, System::Object ^ state);
[System.Security.SecurityCritical]
public static void Run (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state);
public static void Run (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object? state);
public static void Run (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state);
[<System.Security.SecurityCritical>]
static member Run : System.Threading.ExecutionContext * System.Threading.ContextCallback * obj -> unit
static member Run : System.Threading.ExecutionContext * System.Threading.ContextCallback * obj -> unit
Public Shared Sub Run (executionContext As ExecutionContext, callback As ContextCallback, state As Object)

Parametry

executionContext
ExecutionContext

Element ExecutionContext do ustawienia.

callback
ContextCallback

Delegat ContextCallback reprezentujący metodę do uruchomienia w podanym kontekście wykonywania.

state
Object

Obiekt, który ma być przekazywany do metody wywołania zwrotnego.

Atrybuty

Wyjątki

executionContext to null.

-lub- executionContext nie został pozyskany za pośrednictwem operacji przechwytywania.

-lub- executionContext został już użyty jako argument wywołania Run(ExecutionContext, ContextCallback, Object) .

Uwagi

Kontekst wykonywania i konteksty synchronizacji wątku wywołującego są zwracane do poprzednich stanów po zakończeniu metody.

Dotyczy