Share via


IVsTaskCompletionSource Interface

Interacts with a task completion source to set its state and get the internal IVsTask instance.

Namespace:  Microsoft.VisualStudio.Shell.Interop
Assemblies:   Microsoft.VisualStudio.Shell.Interop.11.0 (in Microsoft.VisualStudio.Shell.Interop.11.0.dll)
  Microsoft.VisualStudio.Shell.11.0 (in Microsoft.VisualStudio.Shell.11.0.dll)

Syntax

'Declaration
<InterfaceTypeAttribute(ComInterfaceType.InterfaceIsIUnknown)> _
<GuidAttribute("CE465203-16BC-4EBD-B4D1-9B4416B80931")> _
Public Interface IVsTaskCompletionSource
[InterfaceTypeAttribute(ComInterfaceType.InterfaceIsIUnknown)]
[GuidAttribute("CE465203-16BC-4EBD-B4D1-9B4416B80931")]
public interface IVsTaskCompletionSource
[InterfaceTypeAttribute(ComInterfaceType::InterfaceIsIUnknown)]
[GuidAttribute(L"CE465203-16BC-4EBD-B4D1-9B4416B80931")]
public interface class IVsTaskCompletionSource
[<InterfaceTypeAttribute(ComInterfaceType.InterfaceIsIUnknown)>]
[<GuidAttribute("CE465203-16BC-4EBD-B4D1-9B4416B80931")>]
type IVsTaskCompletionSource =  interface end
public interface IVsTaskCompletionSource

The IVsTaskCompletionSource type exposes the following members.

Properties

  Name Description
Public property Task Gets the task owned by this source.

Top

Methods

  Name Description
Public method AddDependentTask Adds the specified task to the task completion sources dependent task list. Then if Wait is called on IVsTaskCompletionSource.Task, the UI can be unblocked correctly.
Public method SetCanceled Sets the task owned by this source to cancelled state, also cancelling the task.
Public method SetFaulted Sets the task owned by this source to the faulted state (with the given HRESULT code).
Public method SetResult Sets the task owned by this source to completed state with the result.

Top

Extension Methods

  Name Description
Public Extension Method CompleteAfterTask<T> (Defined by VsTaskLibraryHelper.)

Top

See Also

Reference

Microsoft.VisualStudio.Shell.Interop Namespace