Firebase. Extensions. TaskExtension
Extension methods for System.Threading.Tasks.Task and System.Threading.Tasks.Task< T > that allow the continuation function to be executed on the main thread in Unity.
Summary
This is compatible with both .NET 3.x and .NET 4.x.
To disable these extension methods entirely, uncheck all platform of /Assets/Firebase/Plugins/Firebase.TaskExtension.dll in Unity Editor.
Public static functions | |
|---|---|
ContinueWithOnMainThread(this Task task, Action< Task > continuation) | TaskExtend Task. |
ContinueWithOnMainThread(this Task task, Action< Task > continuation, CancellationToken cancellationToken) | TaskExtend Task. |
ContinueWithOnMainThread< T >(this Task< T > task, Action< Task< T >> continuation) | TaskExtend Task< T >. |
ContinueWithOnMainThread< TResult >(this Task task, Func< Task, TResult > continuation) | Task< TResult >Extend Task. |
ContinueWithOnMainThread< TResult >(this Task task, Func< Task, TResult > continuation, CancellationToken cancellationToken) | Task< TResult >Extend Task. |
ContinueWithOnMainThread< TResult, T >(this Task< T > task, Func< Task< T >, TResult > continuation) | Task< TResult >Extend Task< T >. |
Public static functions
ContinueWithOnMainThread
TaskContinueWithOnMainThread(thisTasktask,Action<Task>continuation)
Extend Task.
Returns a Task which completes once the given task is complete and the given continuation function is called from the main thread in Unity.
| Details | |||||
|---|---|---|---|---|---|
| Parameters |
| ||||
| Returns | A new Task that is complete after the continuation is executed on the main thread. |
ContinueWithOnMainThread
TaskContinueWithOnMainThread(thisTasktask,Action<Task>continuation,CancellationTokencancellationToken)
Extend Task.
Returns a Task which completes once the given task is complete and the given continuation function is called from the main thread in Unity, with a cancellation token.
| Details | |||||||
|---|---|---|---|---|---|---|---|
| Parameters |
| ||||||
| Returns | A new Task that is complete after the continuation is executed on the main thread. |
ContinueWithOnMainThread< T >
TaskContinueWithOnMainThread<T>(thisTask<T>task,Action<Task<T>>continuation)
Extend Task< T >.
Returns a Task which completes once the given task is complete and the given continuation function is called from the main thread in Unity.
| Details | |||||
|---|---|---|---|---|---|
| Template Parameters |
| ||||
| Parameters |
| ||||
| Returns | A new Task that is complete after the continuation is executed on the main thread. |
ContinueWithOnMainThread< TResult >
Task<TResult>ContinueWithOnMainThread<TResult>(thisTasktask,Func<Task,TResult>continuation)
Extend Task.
Returns a Task< TResult > which completes once the given task is complete and the given continuation function with return value TResult is called from the main thread in Unity.
| Details | |||||
|---|---|---|---|---|---|
| Template Parameters |
| ||||
| Parameters |
| ||||
| Returns | A new Task of type TResult, that is complete after the continuation is executed on the main thread. |
ContinueWithOnMainThread< TResult >
Task<TResult>ContinueWithOnMainThread<TResult>(thisTasktask,Func<Task,TResult>continuation,CancellationTokencancellationToken)
Extend Task.
Returns a Task< TResult > which completes once the given task is complete and the given continuation function with return value TResult is called from the main thread in Unity, with a cancellation token.
| Details | |||||||
|---|---|---|---|---|---|---|---|
| Template Parameters |
| ||||||
| Parameters |
| ||||||
| Returns | A new Task of type TResult, that is complete after the continuation is executed on the main thread. |
ContinueWithOnMainThread< TResult, T >
Task<TResult>ContinueWithOnMainThread<TResult,T>(thisTask<T>task,Func<Task<T>,TResult>continuation)
Extend Task< T >.
Returns a Task< TResult > which completes once the given task is complete and the given continuation function with return value TResult is called from the main thread in Unity.
| Details | |||||
|---|---|---|---|---|---|
| Template Parameters |
| ||||
| Parameters |
| ||||
| Returns | A new Task of type TResult, that is complete after the continuation is executed on the main thread. |
Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2022-07-27 UTC.