RxAs.Rx4.ProofTests.Mock.ManualScheduler.RunNext C# (CSharp) Method

RunNext() public method

public RunNext ( ) : void
return void
        public void RunNext()
        {
            if (actions.Count > 0)
            {
                actions.Dequeue()();
            }
        }

Usage Example

Beispiel #1
1
        public void interval_is_cancelled_on_completion()
        {
            var subject = new Subject<int>();

            var stats = new StatsObserver<int>();

            var scheduler = new ManualScheduler();

            subject
                .Sample(TimeSpan.FromSeconds(1), scheduler)
                .Subscribe(stats);

            subject.OnNext(0);
            subject.OnCompleted();
            scheduler.RunNext();

            Assert.AreEqual(0, scheduler.QueueSize);
        }
All Usage Examples Of RxAs.Rx4.ProofTests.Mock.ManualScheduler::RunNext