Table of Contents

Class AsyncOperationExtensions

Namespace
TAssetBundle.Extensions
Assembly
TAssetBundle.Extensions.dll

Static class providing extension methods for AsyncOperation.

public static class AsyncOperationExtensions
Inheritance
AsyncOperationExtensions
Inherited Members

Methods

CompleteAfter(AsyncOperation, Task)

public static void CompleteAfter(this AsyncOperation asyncOperation, Task task)

Parameters

asyncOperation AsyncOperation
task Task

CompleteAfter<T>(AsyncOperation<T>, Task<T>)

public static void CompleteAfter<T>(this AsyncOperation<T> asyncOperation, Task<T> task)

Parameters

asyncOperation AsyncOperation<T>
task Task<T>

Type Parameters

T

ToTask(AsyncOperation)

Converts the AsyncOperation to a Task and awaits until the operation is complete.

public static Task ToTask(this AsyncOperation asyncOperation)

Parameters

asyncOperation AsyncOperation

The asynchronous operation to await.

Returns

Task

A Task that completes when the operation is done.

ToTask<T>(AsyncOperation<T>)

Converts the AsyncOperation<T> to a Task and awaits until the operation is complete, returning the result.

public static Task<T> ToTask<T>(this AsyncOperation<T> asyncOperation)

Parameters

asyncOperation AsyncOperation<T>

The asynchronous operation to await.

Returns

Task<T>

A Task that completes when the operation is done and returns the result.

Type Parameters

T

The result type of the operation.