示例#1
0
 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)
     })));
 }
示例#2
0
            public void Dispose()
            {
                RefCountDisposable parent;

                lock (parentLock)
                {
                    parent  = _parent;
                    _parent = null;
                }
                if (parent != null)
                {
                    parent.Release();
                }
            }
示例#3
0
 public InnerDisposable(RefCountDisposable parent)
 {
     _parent = parent;
 }