示例#1
0
 public static IDisposable SubscribeSafe <T>(this INatsObservable <T> ob, IObserver <T> observer) where T : class
 => ob.Subscribe(NatsObserver.Safe <T>(observer.OnNext, observer.OnError, observer.OnCompleted));
示例#2
0
 public static IDisposable SubscribeSafe <T>(this INatsObservable <T> ob, Action <T> onNext, Action <Exception> onError = null, Action onCompleted = null)
 => ob.Subscribe(NatsObserver.Safe(onNext, onError, onCompleted));