Partilhar via


VsTaskLibraryHelper.Yield Method

Definition

Overloads

Yield(VsTaskRunContext, IVsTaskCompletionSource)

Yields the current operation on the thread, the rest of the async method will be scheduled as a continuation.

Yield(IVsTaskSchedulerService, VsTaskRunContext, IVsTaskCompletionSource)

Yields the current operation on the thread, the rest of the async method will be scheduled as a continuation.

Yield(VsTaskRunContext, IVsTaskCompletionSource)

Yields the current operation on the thread, the rest of the async method will be scheduled as a continuation.

public static Microsoft.Internal.VisualStudio.Shell.YieldAwaiter Yield (Microsoft.VisualStudio.Shell.VsTaskRunContext context = Microsoft.VisualStudio.Shell.VsTaskRunContext.CurrentContext, Microsoft.VisualStudio.Shell.Interop.IVsTaskCompletionSource taskCompletionSource = default);
static member Yield : Microsoft.VisualStudio.Shell.VsTaskRunContext * Microsoft.VisualStudio.Shell.Interop.IVsTaskCompletionSource -> Microsoft.Internal.VisualStudio.Shell.YieldAwaiter
Public Function Yield (Optional context As VsTaskRunContext = Microsoft.VisualStudio.Shell.VsTaskRunContext.CurrentContext, Optional taskCompletionSource As IVsTaskCompletionSource = Nothing) As YieldAwaiter

Parameters

context
VsTaskRunContext

Context to use for scheduling the rest of the async method.

taskCompletionSource
IVsTaskCompletionSource

If a task completion source is passed in, the task created will be added as a dependency.

Returns

Microsoft.Internal.VisualStudio.Shell.YieldAwaiter

an awaiter implementation to use with await keyword.

Applies to

Yield(IVsTaskSchedulerService, VsTaskRunContext, IVsTaskCompletionSource)

Yields the current operation on the thread, the rest of the async method will be scheduled as a continuation.

public static Microsoft.Internal.VisualStudio.Shell.YieldAwaiter Yield (this Microsoft.VisualStudio.Shell.Interop.IVsTaskSchedulerService scheduler, Microsoft.VisualStudio.Shell.VsTaskRunContext context = Microsoft.VisualStudio.Shell.VsTaskRunContext.CurrentContext, Microsoft.VisualStudio.Shell.Interop.IVsTaskCompletionSource taskCompletionSource = default);
static member Yield : Microsoft.VisualStudio.Shell.Interop.IVsTaskSchedulerService * Microsoft.VisualStudio.Shell.VsTaskRunContext * Microsoft.VisualStudio.Shell.Interop.IVsTaskCompletionSource -> Microsoft.Internal.VisualStudio.Shell.YieldAwaiter
<Extension()>
Public Function Yield (scheduler As IVsTaskSchedulerService, Optional context As VsTaskRunContext = Microsoft.VisualStudio.Shell.VsTaskRunContext.CurrentContext, Optional taskCompletionSource As IVsTaskCompletionSource = Nothing) As YieldAwaiter

Parameters

scheduler
IVsTaskSchedulerService

Task scheduler service instance.

context
VsTaskRunContext

Context to use for scheduling the rest of the async method.

taskCompletionSource
IVsTaskCompletionSource

If a task completion source is passed in, the task created will be added as a dependency.

Returns

Microsoft.Internal.VisualStudio.Shell.YieldAwaiter

an awaiter implementation to use with await keyword.

Applies to