Struct AsyncAwaiter<TResult>
Provides an object that waits for the completion of an asynchronous operation. This type and its members are intended for compiler use only.
Implements
Inherited Members
System.ValueType.Equals(System.Object)
System.ValueType.GetHashCode()
System.ValueType.ToString()
System.Object.Equals(System.Object, System.Object)
System.Object.GetType()
System.Object.ReferenceEquals(System.Object, System.Object)
Namespace: UnityFx.Async.CompilerServices
Assembly: UnityFx.Async-netstandard2.0.dll
Syntax
public struct AsyncAwaiter<TResult> : INotifyCompletion
Type Parameters
| Name | Description |
|---|---|
| TResult |
Constructors
| Improve this Doc View SourceAsyncAwaiter(IAsyncOperation<TResult>)
Initializes a new instance of the AsyncAwaiter<TResult> struct.
Declaration
public AsyncAwaiter(IAsyncOperation<TResult> op)
Parameters
| Type | Name | Description |
|---|---|---|
| IAsyncOperation<TResult> | op |
AsyncAwaiter(IAsyncOperation<TResult>, SynchronizationContext)
Initializes a new instance of the AsyncAwaiter<TResult> struct.
Declaration
public AsyncAwaiter(IAsyncOperation<TResult> op, SynchronizationContext syncContext)
Parameters
| Type | Name | Description |
|---|---|---|
| IAsyncOperation<TResult> | op | |
| SynchronizationContext | syncContext |
Properties
| Improve this Doc View SourceIsCompleted
Gets a value indicating whether the underlying operation is completed.
Declaration
public bool IsCompleted { get; }
Property Value
| Type | Description |
|---|---|
| Boolean | The operation completion flag. |
Methods
| Improve this Doc View SourceGetResult()
Returns the source result value.
Declaration
public TResult GetResult()
Returns
| Type | Description |
|---|---|
| TResult | Returns the underlying operation result. |
OnCompleted(Action)
Declaration
public void OnCompleted(Action continuation)
Parameters
| Type | Name | Description |
|---|---|---|
| Action | continuation |
Implements
See Also
IAsyncOperation<TResult>