예제 #1
0
 public void SetSource(Outlet outlet)
 {
     _subscription.Dispose();
     if (outlet != null)
     {
         _subscription = outlet.Subscribe(new AnonymousObserver <object>(o => Post((T)o)));
     }
 }
예제 #2
0
 public IDisposable Subscribe(IObserver <T> observer)
 {
     return(_outlet.Subscribe(new AnonymousObserver <object>(o =>
     {
         var val = ValueConverter.Convert <object, T>(o);
         observer.OnNext(val);
     },
                                                             observer.OnError,
                                                             observer.OnCompleted)));
 }