TplExtensions.AttachToParent 方法

定义

重载

AttachToParent(Task)

创建附加到父任务的任务,但是,所产生的结果与现有任务相同。

AttachToParent<T>(Task<T>)

创建附加到父任务的任务,但是,所产生的结果与现有任务相同。

AttachToParent(Task)

创建附加到父任务的任务,但是,所产生的结果与现有任务相同。

public:
[System::Runtime::CompilerServices::Extension]
 static System::Threading::Tasks::Task ^ AttachToParent(System::Threading::Tasks::Task ^ task);
public static System.Threading.Tasks.Task AttachToParent (this System.Threading.Tasks.Task task);
static member AttachToParent : System.Threading.Tasks.Task -> System.Threading.Tasks.Task
<Extension()>
Public Function AttachToParent (task As Task) As Task

参数

task
Task

用 AttachedToParent 任务包装的任务。

返回

Task

附加到父级的任务。

适用于

AttachToParent<T>(Task<T>)

创建附加到父任务的任务,但是,所产生的结果与现有任务相同。

public:
generic <typename T>
[System::Runtime::CompilerServices::Extension]
 static System::Threading::Tasks::Task<T> ^ AttachToParent(System::Threading::Tasks::Task<T> ^ task);
public static System.Threading.Tasks.Task<T> AttachToParent<T> (this System.Threading.Tasks.Task<T> task);
static member AttachToParent : System.Threading.Tasks.Task<'T> -> System.Threading.Tasks.Task<'T>
<Extension()>
Public Function AttachToParent(Of T) (task As Task(Of T)) As Task(Of T)

类型参数

T

任务产生的值的类型。

参数

task
Task<T>

用 AttachedToParent 任务包装的任务。

返回

Task<T>

附加到父级的任务。

适用于