ExecutionContext.Run(ExecutionContext, ContextCallback, Object) メソッド

定義

現在のスレッドで、指定した実行コンテキストでメソッドを実行します。

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)

パラメーター

executionContext
ExecutionContext

設定する ExecutionContext

callback
ContextCallback

指定された実行コンテキストで実行するメソッドを表す ContextCallback デリゲート。

state
Object

コールバック メソッドに渡すオブジェクト。

属性

例外

executionContextnullです。

-又は-

executionContext はキャプチャ操作によって取得されませんでした。

-又は-

executionContext は、 Run(ExecutionContext, ContextCallback, Object) 呼び出しの引数として既に使用されています。

注釈

呼び出し元スレッドの実行コンテキストと同期コンテキストは、メソッドの完了時に以前の状態に戻されます。

適用対象