ExecutionContext.Run(ExecutionContext, ContextCallback, Object) Metoda

Definice

Spustí metodu v zadaném kontextu spuštění v aktuálním vlákně.

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

Objekt ExecutionContext k nastavení.

callback
ContextCallback

Delegát ContextCallback , který představuje metodu, která se má spustit v zadaném kontextu provádění.

state
Object

Objekt, který se má předat metodě zpětného volání.

Atributy

Výjimky

executionContext je null.

-nebo- executionContext nebyla získána prostřednictvím operace zachycení.

-nebo- executionContext již byl použit jako argument pro Run(ExecutionContext, ContextCallback, Object) volání.

Poznámky

Kontext spuštění a kontexty synchronizace volajícího vlákna se po dokončení metody vrátí do předchozích stavů.

Platí pro