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
context
Type: Microsoft.VisualStudio.Shell.VsTaskRunContextThe context to use for scheduling the rest of the async method.
taskCompletionSource
Type: Microsoft.VisualStudio.Shell.Interop.IVsTaskCompletionSourceIf not nulla null reference (Nothing in Visual Basic), the task created is added as a dependency.
Return Value
Type: YieldAwaiter
An awaiter implementation to use with the await keyword.
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.