Struct TaskOrResult<T>
public struct TaskOrResult<T>
Type Parameters
T
- Inherited Members
Constructors
TaskOrResult(Task<T>)
public TaskOrResult(Task<T> task)
Parameters
task
Task<T>
TaskOrResult(T)
public TaskOrResult(T result)
Parameters
result
T
Fields
Result
public readonly T Result
Field Value
- T
Task
public readonly Task<T> Task
Field Value
- Task<T>
Methods
AwaitResult()
public Task<T> AwaitResult()
Returns
- Task<T>
GetCurrentResult()
public T GetCurrentResult()
Returns
- T
WaitForResult()
public T WaitForResult()
Returns
- T
Operators
implicit operator TaskOrResult<T>(Task<T>)
public static implicit operator TaskOrResult<T>(Task<T> task)
Parameters
task
Task<T>
Returns
- TaskOrResult<T>
implicit operator TaskOrResult<T>(T)
public static implicit operator TaskOrResult<T>(T result)
Parameters
result
T
Returns
- TaskOrResult<T>