UniTaskObservableExtensions Class
Namespace: Cysharp.Threading.Tasks
Assembly: cs.temp.dll.dll
public static class UniTaskObservableExtensions
Inheritance
System.Object → UniTaskObservableExtensionsMembers
Methods
Name | Description |
---|---|
ToObservable(UniTask) | Ideally returns IObservabl[Unit] is best but Cysharp.Threading.Tasks does not have Unit so return AsyncUnit instead. |
ToObservable<T>(UniTask<T>) | |
ToUniTask<T>(IObservable<T>, Boolean, CancellationToken) |
Methods
ToObservable(UniTask)
Ideally returns IObservabl[Unit] is best but Cysharp.Threading.Tasks does not have Unit so return AsyncUnit instead.
public static IObservable<AsyncUnit> ToObservable(this UniTask task)
Parameters
task
UniTask
Returns
- IObservable<AsyncUnit>
ToObservable<T>(UniTask<T>)
public static IObservable<T> ToObservable<T>(this UniTask<T> task)
Parameters
task
UniTask<T>
Returns
- IObservable<T>
Type Parameters
T
ToUniTask<T>(IObservable<T>, Boolean, CancellationToken)
public static UniTask<T> ToUniTask<T>(this IObservable<T> source, bool useFirstValue = false, CancellationToken cancellationToken = default(CancellationToken))
Parameters
source
IObservable<T>useFirstValue
System.BooleancancellationToken
System.Threading.CancellationToken
Returns
- UniTask<T>
Type Parameters
T