VsTaskLibraryHelper.AsVsTask<T> Method

Wraps a JoinableTask<T> instance in an IVsTask that can be returned to COM clients.

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


<ExtensionAttribute> _
Public Shared Function AsVsTask(Of T) ( _
    joinableTask As JoinableTask(Of T) _
) As IVsTask
public static IVsTask AsVsTask<T>(
    this JoinableTask<T> joinableTask
generic<typename T>
static IVsTask^ AsVsTask(
    JoinableTask<T>^ joinableTask
static member AsVsTask : 
        joinableTask:JoinableTask<'T> -> IVsTask
JScript does not support generic types or methods.

Type Parameters

  • T
    The type of value returned by the asynchronous operation.


Return Value

Type: Microsoft.VisualStudio.Shell.Interop.IVsTask
An IVsTask instance.

Usage Note

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


VsTaskLibraryHelper Class

Microsoft.VisualStudio.Shell Namespace