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
- System.IObservable<AsyncUnit>
ToObservable<T>(UniTask<T>)
public static IObservable<T> ToObservable<T>(this UniTask<T> task)
Parameters
task
UniTask<T>
Returns
- System.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 = null)
Parameters
source
System.IObservable<T>useFirstValue
System.BooleancancellationToken
CancellationToken
Returns
- UniTask<T>
Type Parameters
T