Class TaskExtensions
Extension methods for Task and System.Threading.Tasks.Task<TResult>.
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: UnityFx.Async.Extensions
Assembly: UnityFx.Async-netstandard2.0.dll
Syntax
public static class TaskExtensions
Methods
| Improve this Doc View SourceToAsync(Task)
Creates an IAsyncOperation instance that completes when the specified task completes.
Declaration
public static AsyncResult ToAsync(this Task task)
Parameters
| Type | Name | Description |
|---|---|---|
| Task | task | The task to convert to IAsyncOperation. |
Returns
| Type | Description |
|---|---|
| AsyncResult | An IAsyncOperation that represents the |
ToAsync<TResult>(Task<TResult>)
Creates an IAsyncOperation instance that completes when the specified task completes.
Declaration
public static AsyncResult<TResult> ToAsync<TResult>(this Task<TResult> task)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Threading.Tasks.Task<TResult> | task | The task to convert to IAsyncOperation. |
Returns
| Type | Description |
|---|---|
| AsyncResult<TResult> | An IAsyncOperation that represents the |
Type Parameters
| Name | Description |
|---|---|
| TResult |