Using this answer I've made my own SybscribeAsync
extension method with parameter:
public static IDisposable SubscribeAsync<T>(this IObservable<T> source, Func<T, Task> func) => source.Select(o => Observable.FromAsync(_ => func(o))) .Concat() .Subscribe();
The method SubscribeAsync
should be used instead of Subscribe(async o => ...)
, unless async void
is not a problem (it could be).
P.S.: naming method SubscribeSynchronous
like ReactiveMarbles does is the option.