ThreadingTools::Apply Method (SynchronizationContext^, Boolean)

 

Applies the specified SynchronizationContext to the caller's context.

Namespace:   Microsoft.VisualStudio.Threading
Assembly:  Microsoft.VisualStudio.Threading (in Microsoft.VisualStudio.Threading.dll)

public:
[ExtensionAttribute]
static SpecializedSyncContext Apply(
	SynchronizationContext^ syncContext,
	bool checkForChangesOnRevert = true
)

Parameters

syncContext
Type: System.Threading::SynchronizationContext^

The synchronization context to apply.

checkForChangesOnRevert
Type: System::Boolean

true if it should check that the applied SynchronizationContext is still the current one when the original is restored.

Return to top
Show: