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 问题”,并将其取代为新的反馈系统。 有关详细信息,请参阅:提交和查看相关反馈