System.Threading.ExecutionContext.Run Method

Runs a method in a specified execution context on the current thread.

Syntax

public static void Run (ExecutionContext executionContext, ContextCallback callback, object state)

Parameters

executionContext
The System.Threading.ExecutionContext to set.
callback
A System.Threading.ContextCallback delegate that represents the method to be run in the provided execution context.
state
The object to pass to the callback method.

Remarks

The execution context is returned to its previous state when the method completes.

Requirements

Namespace: System.Threading
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 2.0.0.0, 4.0.0.0
Since: .NET 2.0