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.14.0 (in Microsoft.VisualStudio.Shell.14.0.dll)

public:
static YieldAwaiter Yield(
	VsTaskRunContext context = VsTaskRunContext::CurrentContext,
	IVsTaskCompletionSource^ taskCompletionSource = null
)

Parameters

context
Type: Microsoft.VisualStudio.Shell::VsTaskRunContext

The context to use for scheduling the rest of the async method.

taskCompletionSource
Type: Microsoft.VisualStudio.Shell.Interop::IVsTaskCompletionSource^

If not null, the task created is added as a dependency.

Return Value

Type: Microsoft.Internal.VisualStudio.Shell::YieldAwaiter

An awaiter implementation to use with the await keyword.

Return to top
Show: