Compartir a través de


ThreadingTools.Apply Method

Applies the specified SynchronizationContext to the caller's context.

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

Syntax

'Declaration
<ExtensionAttribute> _
Public Shared Function Apply ( _
    syncContext As SynchronizationContext, _
    checkForChangesOnRevert As Boolean _
) As SpecializedSyncContext
public static SpecializedSyncContext Apply(
    this SynchronizationContext syncContext,
    bool checkForChangesOnRevert
)
[ExtensionAttribute]
public:
static SpecializedSyncContext Apply(
    SynchronizationContext^ syncContext, 
    bool checkForChangesOnRevert
)
static member Apply : 
        syncContext:SynchronizationContext * 
        checkForChangesOnRevert:bool -> SpecializedSyncContext
public static function Apply(
    syncContext : SynchronizationContext, 
    checkForChangesOnRevert : boolean
) : SpecializedSyncContext

Parameters

Return Value

Type: Microsoft.VisualStudio.Threading.SpecializedSyncContext
Returns SpecializedSyncContext.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type SynchronizationContext. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).

.NET Framework Security

See Also

Reference

ThreadingTools Class

Microsoft.VisualStudio.Threading Namespace