TplExtensions.AttachToParent Method
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
AttachToParent(Task) |
Creates a task that is attached to the parent task, but produces the same result as an existing task. |
AttachToParent<T>(Task<T>) |
Creates a task that is attached to the parent task, but produces the same result as an existing task. |
AttachToParent(Task)
Creates a task that is attached to the parent task, but produces the same result as an existing 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
Parameters
- task
- Task
The task to wrap with an AttachedToParent task.
Returns
A task that is attached to parent.
Applies to
AttachToParent<T>(Task<T>)
Creates a task that is attached to the parent task, but produces the same result as an existing task.
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)
Type Parameters
- T
The type of value produced by the task.
Parameters
- task
- Task<T>
The task to wrap with an AttachedToParent task.
Returns
A task that is attached to parent.