Share via


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

콜백 메서드로 전달할 개체입니다.

특성

예외

executionContext이(가) null인 경우.

또는 캡처 작업을 통해 executionContext를 가져오지 않은 경우

또는 executionContext가 이미 Run(ExecutionContext, ContextCallback, Object) 호출의 인수로 사용된 경우

설명

메서드가 완료되면 호출 스레드의 실행 컨텍스트 및 동기화 컨텍스트가 이전 상태로 반환됩니다.

적용 대상