Modifica

Condividi tramite


TaskCompletionSource Constructors

Definition

Overloads

TaskCompletionSource()

Creates a TaskCompletionSource.

TaskCompletionSource(Object)

Creates a TaskCompletionSource with the specified state.

TaskCompletionSource(TaskCreationOptions)

Creates a TaskCompletionSource with the specified options.

TaskCompletionSource(Object, TaskCreationOptions)

Creates a TaskCompletionSource with the specified state and options.

TaskCompletionSource()

Source:
TaskCompletionSource.cs
Source:
TaskCompletionSource.cs
Source:
TaskCompletionSource.cs
public:
 TaskCompletionSource();
public TaskCompletionSource ();
Public Sub New ()

Applies to

TaskCompletionSource(Object)

Source:
TaskCompletionSource.cs
Source:
TaskCompletionSource.cs
Source:
TaskCompletionSource.cs

Creates a TaskCompletionSource with the specified state.

public:
 TaskCompletionSource(System::Object ^ state);
public TaskCompletionSource (object? state);
new System.Threading.Tasks.TaskCompletionSource : obj -> System.Threading.Tasks.TaskCompletionSource
Public Sub New (state As Object)

Parameters

state
Object

The state to use as the underlying Task's AsyncState.

Applies to

TaskCompletionSource(TaskCreationOptions)

Source:
TaskCompletionSource.cs
Source:
TaskCompletionSource.cs
Source:
TaskCompletionSource.cs

Creates a TaskCompletionSource with the specified options.

public:
 TaskCompletionSource(System::Threading::Tasks::TaskCreationOptions creationOptions);
public TaskCompletionSource (System.Threading.Tasks.TaskCreationOptions creationOptions);
new System.Threading.Tasks.TaskCompletionSource : System.Threading.Tasks.TaskCreationOptions -> System.Threading.Tasks.TaskCompletionSource
Public Sub New (creationOptions As TaskCreationOptions)

Parameters

creationOptions
TaskCreationOptions

The options to use when creating the underlying Task.

Exceptions

One or more of the specified creationOptions are invalid for use with a TaskCompletionSource.

Remarks

The Task created by this instance and accessible through its Task property will be instantiated using the specified creationOptions.

Applies to

TaskCompletionSource(Object, TaskCreationOptions)

Source:
TaskCompletionSource.cs
Source:
TaskCompletionSource.cs
Source:
TaskCompletionSource.cs

Creates a TaskCompletionSource 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);
new System.Threading.Tasks.TaskCompletionSource : obj * System.Threading.Tasks.TaskCreationOptions -> System.Threading.Tasks.TaskCompletionSource
Public Sub New (state As Object, creationOptions As TaskCreationOptions)

Parameters

state
Object

The state to use as the underlying Task's AsyncState.

creationOptions
TaskCreationOptions

The options to use when creating the underlying Task.

Exceptions

One or more of the specified creationOptions are invalid for use with a TaskCompletionSource.

Applies to