public void SetSource(Outlet outlet) { _subscription.Dispose(); if (outlet != null) { _subscription = outlet.Subscribe(new AnonymousObserver <object>(o => Post((T)o))); } }
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))); }