System::Threading::Tasks::ResultValueTask class
Contents
[
Hide
]ResultValueTask class
Represents a hybrid task-like type that can wrap either a direct result value or a ResultTask
template<typename T>class ResultValueTask : public System::IEquatable<ResultValueTask<T>>,
public System::Details::BoxableObjectBase
| Parameter | Description |
|---|---|
| T | The type of the result produced by the task. |
Methods
| Method | Description |
|---|---|
| AsTask() const | Converts this ResultValueTask to a shared pointer to ResultTask |
| ConfigureAwait(bool) const | Configures an awaiter for this task. |
| Equals(ResultValueTask) override | Determines whether this instance equals another ResultValueTask instance. |
| Equals(System::SharedPtr<System::Object>) override | Determines whether this instance equals another object. |
| get_IsCanceled() const | Gets a value indicating whether the task completed due to being canceled. |
| get_IsCompleted() const | Gets a value indicating whether the task has completed. |
| get_IsCompletedSuccessfully() const | Gets a value indicating whether the task completed successfully. |
| get_IsFaulted() const | Gets a value indicating whether the task completed due to an unhandled exception. |
| get_Result() const | Gets the result of the completed task. |
| GetAwaiter() const | Gets an awaiter for this task to support await expressions. |
| operator!=(const ResultValueTask&) const | Inequality operator for ResultValueTask. |
| operator==(const ResultValueTask&) const | Equality operator for ResultValueTask. |
| ResultValueTask() | Constructs an empty, uninitialized ResultValueTask. |
| ResultValueTask(const T&) | Constructs a completed ResultValueTask with the specified result. |
| ResultValueTask(const RTaskPtr<T>&) | Constructs a ResultValueTask from a shared pointer to a ResultTask |
Remarks
ResultValueTask combines the benefits of ValueTask (reduced allocations for synchronous results) with the ability to wrap existing ResultTask
See Also
- Class IEquatable
- Namespace System::Threading::Tasks
- Library Aspose.PDF for C++