System::Threading::Tasks::ResultValueTask::ResultValueTask constructor

ResultValueTask::ResultValueTask() constructor

Constructs an empty, uninitialized ResultValueTask.

System::Threading::Tasks::ResultValueTask<T>::ResultValueTask()

Remarks

The task is not completed and contains no result. Attempting to get the result will throw an exception.

See Also

ResultValueTask::ResultValueTask(const RTaskPtr<T>&) constructor

Constructs a ResultValueTask from a shared pointer to a ResultTask.

System::Threading::Tasks::ResultValueTask<T>::ResultValueTask(const RTaskPtr<T> &task)
ParameterTypeDescription
taskconst RTaskPtr<T>&The task to wrap. Can be null for an empty task.

Remarks

The ResultValueTask will represent the state and result of the provided task.

See Also

ResultValueTask::ResultValueTask(const T&) constructor

Constructs a completed ResultValueTask with the specified result.

System::Threading::Tasks::ResultValueTask<T>::ResultValueTask(const T &result)
ParameterTypeDescription
resultconst T&The result value to wrap in a completed task.

Remarks

This creates a successfully completed task that immediately returns the value.

See Also