Esempio n. 1
0
        public void SetUp()
        {
            scheduler = new TestScheduler();

            observable = scheduler.CreateColdObservable(
                Next(10, 1),
                Next(15, 2),
                Next(20, 3),
                Next(35, 4),
                Next(40, 5),
                Next(46, 6),
                Completed(47));

            observer = new MockObserver <int>(scheduler);

            observable
            .Throttle(TimeSpan.FromTicks(5), scheduler)
            .Subscribe(observer);
        }
Esempio n. 2
0
        public IObservable <IDictionary <string, object> > Run(IDbCommand command, IDbConnection connection, IDictionary <string, int> index)
        {
            try
            {
                connection.OpenIfClosed();
            }
            catch (DbException ex)
            {
                throw new AdoAdapterException(ex.Message, ex);
            }
            var reader = command.TryExecuteReader();

            if (index == null)
            {
                index = reader.CreateDictionaryIndex();
            }

            return(ColdObservable.Create <IDictionary <string, object> >(o => RunObservable(command, connection, reader, index, o)));
        }