VsTaskLibraryHelper.CreateTaskCompletionSource Method
Creates a task-completion source instance with the specified options.
Namespace: Microsoft.VisualStudio.Shell
Assembly: Microsoft.VisualStudio.Shell.12.0 (in Microsoft.VisualStudio.Shell.12.0.dll)
Syntax
'Declaration
<ExtensionAttribute> _
Public Shared Function CreateTaskCompletionSource ( _
service As IVsTaskSchedulerService, _
options As VsTaskCreationOptions, _
asyncState As Object _
) As IVsTaskCompletionSource
public static IVsTaskCompletionSource CreateTaskCompletionSource(
this IVsTaskSchedulerService service,
VsTaskCreationOptions options,
Object asyncState
)
[ExtensionAttribute]
public:
static IVsTaskCompletionSource^ CreateTaskCompletionSource(
IVsTaskSchedulerService^ service,
VsTaskCreationOptions options,
Object^ asyncState
)
static member CreateTaskCompletionSource :
service:IVsTaskSchedulerService *
options:VsTaskCreationOptions *
asyncState:Object -> IVsTaskCompletionSource
public static function CreateTaskCompletionSource(
service : IVsTaskSchedulerService,
options : VsTaskCreationOptions,
asyncState : Object
) : IVsTaskCompletionSource
Parameters
service
Type: Microsoft.VisualStudio.Shell.Interop.IVsTaskSchedulerService[in] The task scheduler service to use to create the completion source.
options
Type: Microsoft.VisualStudio.Shell.VsTaskCreationOptions[in] Task creation options for the task controlled by the completion source.
asyncState
Type: Object[in] The asynchronous state that will be stored by the task controlled by the completion source.
Return Value
Type: Microsoft.VisualStudio.Shell.Interop.IVsTaskCompletionSource
The task scheduler service that is creating the task completion source.
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type IVsTaskSchedulerService. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
.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.