System.Security.SecurityContext.Run Method

Runs the specified method in the specified security context on the current thread.

Syntax

public static void Run (SecurityContext securityContext, System.Threading.ContextCallback callback, object state)

Parameters

securityContext
The security context to set.
callback
The delegate that represents the method to run in the specified security context.
state
The object to pass to the callback method.

Remarks

The security context for the current thread is returned to its previous state when the method call is complete.

Requirements

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