Show / Hide Table of Contents

Class TaskExtensions

Extension methods for Task and System.Threading.Tasks.Task<TResult>.

Inheritance
Object
TaskExtensions
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 Source

ToAsync(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 task.

| Improve this Doc View Source

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 task.

Type Parameters
Name Description
TResult
  • Improve this Doc
  • View Source
Back to top Copyright (c) 2017-2018 Alexander Bogarsukov