TaskCompletionSource 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.
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
Creates a TaskCompletionSource.
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
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
- 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
意見反應
https://aka.ms/ContentUserFeedback。
即將登場:在 2024 年,我們將逐步淘汰 GitHub 問題作為內容的意見反應機制,並將它取代為新的意見反應系統。 如需詳細資訊,請參閱:提交並檢視相關的意見反應