Пример #1
0
        public AsyncDataStore(Expression expression, bool noStreamingResponse)
        {
            int num;

            this.syncObject         = new object();
            this.expression         = expression;
            this.dataAvailableEvent = new ManualResetEvent(false);
            this.enumerators        = new Queue <IEnumerator <TItem> >();
            if (!noStreamingResponse && this.DoesExpressionNeedCompleteDataSet(expression))
            {
                noStreamingResponse = true;
            }
            AsyncDataStore <TItem> boundedResetList = this;

            if (noStreamingResponse)
            {
                num = 0x7fffffff;
            }
            else
            {
                num = 10;
            }
            boundedResetList.currentDataList           = new BoundedResetList <TItem>(num);
            this.currentDataList.PreResetEventHandler += new EventHandler <BoundedResetList <TItem> .PreResetEventArgs>(this.ResetEventHandler);
        }
Пример #2
0
 public BlockingEnumerator(AsyncDataStore <TItem> dataStore)
 {
     this.dataStore         = dataStore;
     this.currentEnumerator = null;
 }