static IObservable <T> AddRef <T>(IObservable <T> xs, RefCountDisposable r) { return(Observable.Create <T>((IObserver <T> observer) => new CompositeDisposable(new IDisposable[] { r.GetDisposable(), xs.Subscribe(observer) }))); }
public void Dispose() { RefCountDisposable parent; lock (parentLock) { parent = _parent; _parent = null; } if (parent != null) { parent.Release(); } }
public InnerDisposable(RefCountDisposable parent) { _parent = parent; }