TaskCompletionSource<TResult> Constructors
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Creates a TaskCompletionSource<TResult> object.
Overloads
TaskCompletionSource<TResult>() |
Creates a TaskCompletionSource<TResult>. |
TaskCompletionSource<TResult>(Object) |
Creates a TaskCompletionSource<TResult> with the specified state. |
TaskCompletionSource<TResult>(TaskCreationOptions) |
Creates a TaskCompletionSource<TResult> with the specified options. |
TaskCompletionSource<TResult>(Object, TaskCreationOptions) |
Creates a TaskCompletionSource<TResult> with the specified state and options. |
TaskCompletionSource<TResult>()
- Source:
- TaskCompletionSource_T.cs
- Source:
- TaskCompletionSource_T.cs
- Source:
- TaskCompletionSource_T.cs
Creates a TaskCompletionSource<TResult>.
public:
TaskCompletionSource();
public TaskCompletionSource ();
Public Sub New ()
See also
Applies to
TaskCompletionSource<TResult>(Object)
- Source:
- TaskCompletionSource_T.cs
- Source:
- TaskCompletionSource_T.cs
- Source:
- TaskCompletionSource_T.cs
Creates a TaskCompletionSource<TResult> with the specified state.
public:
TaskCompletionSource(System::Object ^ state);
public TaskCompletionSource (object state);
public TaskCompletionSource (object? state);
new System.Threading.Tasks.TaskCompletionSource<'Result> : obj -> System.Threading.Tasks.TaskCompletionSource<'Result>
Public Sub New (state As Object)
Parameters
- state
- Object
The state to use as the underlying Task<TResult>'s AsyncState.
See also
Applies to
TaskCompletionSource<TResult>(TaskCreationOptions)
- Source:
- TaskCompletionSource_T.cs
- Source:
- TaskCompletionSource_T.cs
- Source:
- TaskCompletionSource_T.cs
Creates a TaskCompletionSource<TResult> with the specified options.
public:
TaskCompletionSource(System::Threading::Tasks::TaskCreationOptions creationOptions);
public TaskCompletionSource (System.Threading.Tasks.TaskCreationOptions creationOptions);
new System.Threading.Tasks.TaskCompletionSource<'Result> : System.Threading.Tasks.TaskCreationOptions -> System.Threading.Tasks.TaskCompletionSource<'Result>
Public Sub New (creationOptions As TaskCreationOptions)
Parameters
- creationOptions
- TaskCreationOptions
The options to use when creating the underlying Task<TResult>.
Exceptions
The creationOptions
represent options invalid for use with a TaskCompletionSource<TResult>.
Remarks
The Task<TResult> created by this instance and accessible through its Task property will be instantiated using the specified creationOptions
.
See also
Applies to
TaskCompletionSource<TResult>(Object, TaskCreationOptions)
- Source:
- TaskCompletionSource_T.cs
- Source:
- TaskCompletionSource_T.cs
- Source:
- TaskCompletionSource_T.cs
Creates a TaskCompletionSource<TResult> with the specified state and options.
public:
TaskCompletionSource(System::Object ^ state, System::Threading::Tasks::TaskCreationOptions creationOptions);
public TaskCompletionSource (object state, System.Threading.Tasks.TaskCreationOptions creationOptions);
public TaskCompletionSource (object? state, System.Threading.Tasks.TaskCreationOptions creationOptions);
new System.Threading.Tasks.TaskCompletionSource<'Result> : obj * System.Threading.Tasks.TaskCreationOptions -> System.Threading.Tasks.TaskCompletionSource<'Result>
Public Sub New (state As Object, creationOptions As TaskCreationOptions)
Parameters
- state
- Object
The state to use as the underlying Task<TResult>'s AsyncState.
- creationOptions
- TaskCreationOptions
The options to use when creating the underlying Task<TResult>.
Exceptions
The creationOptions
represent options invalid for use with a TaskCompletionSource<TResult>.
See also
Applies to
.NET