Ejemplo n.º 1
0
        public IEnumerator <T> GetCurrentData(ref long startTime)
        {
            lock (this)
            {
                IEnumerator <T> enumerator = new SlidingIndex <T> .Enumerator(this, ref startTime);

                return(enumerator);
            }
        }
Ejemplo n.º 2
0
        public IEnumerator <T> GetCurrentData()
        {
            lock (this)
            {
                IEnumerator <T> enumerator = new SlidingIndex <T> .Enumerator(this);

                return(enumerator);
            }
        }
Ejemplo n.º 3
0
            public Enumerator(SlidingIndex <T> slidingIndex)
            {
                foreach (InstantaneousIndex <T> indexEntry in slidingIndex._mainIndex)
                {
                    //for older enteries which are not supposed to change
                    if (indexEntry.ClockTime != Clock.CurrentTimeInSeconds)
                    {
                        _index.Add(indexEntry);
                    }
                    else
                    {
                        //index being modified currently
                        _index.Add(indexEntry.Clone() as InstantaneousIndex <T>);
                    }
                }

                _enumerator = _index.GetEnumerator();
            }