Dela via


VsTaskLibraryHelper.IsUIThreadContext Method

Determines whether the specified context represents UI thread work.

Namespace:  Microsoft.VisualStudio.Shell
Assembly:  Microsoft.VisualStudio.Shell.12.0 (in Microsoft.VisualStudio.Shell.12.0.dll)

Syntax

'Declaration
<ExtensionAttribute> _
Public Shared Function IsUIThreadContext ( _
    context As VsTaskRunContext _
) As Boolean
public static bool IsUIThreadContext(
    this VsTaskRunContext context
)
[ExtensionAttribute]
public:
static bool IsUIThreadContext(
    VsTaskRunContext context
)
static member IsUIThreadContext : 
        context:VsTaskRunContext -> bool
public static function IsUIThreadContext(
    context : VsTaskRunContext
) : boolean

Parameters

Return Value

Type: Boolean
true if the context represents work on the UI thread.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type VsTaskRunContext. 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

VsTaskLibraryHelper Class

Microsoft.VisualStudio.Shell Namespace