Ejemplo n.º 1
0
        public override void SetAdapter(Adapter adapter)
        {
            base.SetAdapter(adapter);

            if (adapter != null)
            {
                adapter.RegisterAdapterDataObserver(EmptyObserver);
            }

            EmptyObserver.OnChanged();
        }
Ejemplo n.º 2
0
        protected override IDisposable SubscribeCore(IObserver <T> observer, IDisposable cancel)
        {
            observer = new EmptyObserver(observer, cancel);

            if (scheduler == Scheduler.Immediate)
            {
                observer.OnCompleted();
                return(Disposable.Empty);
            }
            else
            {
                return(scheduler.Schedule(observer.OnCompleted));
            }
        }