HostExecutionContextManager.Revert Method (Object)

 

Restores the host execution context to its prior state.

Namespace:   System.Threading
Assembly:  mscorlib (in mscorlib.dll)

[SecurityCriticalAttribute]
public virtual void Revert(
	object previousState
)

Parameters

previousState
Type: System.Object

The previous context state to revert to.

Exception Condition
InvalidOperationException

previousState is null.

-or-

previousState was not created on the current thread.

-or-

previousState is not the last state for the HostExecutionContext.

previousState must be the object returned by the SetHostExecutionContext method.

SecurityCriticalAttribute

Requires full trust for the immediate caller. This member cannot be used by partially trusted or transparent code.

.NET Framework
Available since 2.0
Return to top
Show: