public PropertyObservable(Regulus.Remote.Property <T> property) { this._Property = property; _Value = _Property.Value; _ThreadUpdater = new ThreadUpdater(() => { }); _ThreadUpdater.Start(); }
protected override IDisposable SubscribeCore(IObserver <T> observer) { _Observer = observer; _ThreadUpdater.Stop(); _ThreadUpdater = new ThreadUpdater(() => { if (_Value.Equals(_Property.Value)) { return; } _Value = _Property.Value; _Observer.OnNext(_Value); }); _ThreadUpdater.Start(); return(this); }