Dela via


VsTaskLibraryHelper.Yield Method (VsTaskRunContext, IVsTaskCompletionSource)

Yields the current operation on the thread, so that the rest of the async method is scheduled as a continuation.

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

Syntax

'Declaration
Public Shared Function Yield ( _
    context As VsTaskRunContext, _
    taskCompletionSource As IVsTaskCompletionSource _
) As YieldAwaiter
public static YieldAwaiter Yield(
    VsTaskRunContext context,
    IVsTaskCompletionSource taskCompletionSource
)
public:
static YieldAwaiter Yield(
    VsTaskRunContext context, 
    IVsTaskCompletionSource^ taskCompletionSource
)
static member Yield : 
        context:VsTaskRunContext * 
        taskCompletionSource:IVsTaskCompletionSource -> YieldAwaiter
public static function Yield(
    context : VsTaskRunContext, 
    taskCompletionSource : IVsTaskCompletionSource
) : YieldAwaiter

Parameters

Return Value

Type: YieldAwaiter
An awaiter implementation to use with the await keyword.

.NET Framework Security

See Also

Reference

VsTaskLibraryHelper Class

Yield Overload

Microsoft.VisualStudio.Shell Namespace