Struct DynamicTaskAwaitable.Awaiter
Provides an object that waits for the completion of an asynchronous task.
Inherited Members
Namespace: DotNext.Threading.Tasks
Assembly: DotNext.dll
Syntax
public struct Awaiter : IFuture, ICriticalNotifyCompletion, INotifyCompletion
Properties
| Improve this Doc View SourceIsCompleted
Gets a value that indicates whether the asynchronous task has completed.
Declaration
public bool IsCompleted { get; }
Property Value
Type | Description |
---|---|
Boolean |
Methods
| Improve this Doc View SourceGetResult()
Gets dynamically typed task result.
Declaration
public dynamic GetResult()
Returns
Type | Description |
---|---|
Object | The result of the completed task; or Value if underlying task is not of type Task<TResult>. |
OnCompleted(Action)
Sets the action to perform when this object stops waiting for the asynchronous task to complete.
Declaration
public void OnCompleted(Action continuation)
Parameters
Type | Name | Description |
---|---|---|
Action | continuation | The action to perform when the wait operation completes. |
Explicit Interface Implementations
| Improve this Doc View SourceICriticalNotifyCompletion.UnsafeOnCompleted(Action)
Declaration
void ICriticalNotifyCompletion.UnsafeOnCompleted(Action continuation)
Parameters
Type | Name | Description |
---|---|---|
Action | continuation |