예제 #1
0
        private VersionedList <T> FindAllList(Predicate <T> match)
        {
            VersionedList <T> results = new VersionedList <T>();

            for (int i = 0; i < this._size; i++)
            {
                if (match(this._items [i]))
                {
                    results.Add(this._items [i]);
                }
            }

            return(results);
        }
예제 #2
0
        public VersionedList <TOutput> ConvertAll <TOutput>(Converter <T, TOutput> converter)
        {
            if (converter == null)
            {
                throw new ArgumentNullException("converter");
            }
            VersionedList <TOutput> u = new VersionedList <TOutput>(_size);

            for (int i = 0; i < _size; i++)
            {
                u._items[i] = converter(_items[i]);
            }

            u._size = _size;
            return(u);
        }
예제 #3
0
 internal Enumerator(VersionedList <T> l)
 {
     this.l = l;
     idx    = NOT_STARTED;
     ver    = l._version;
 }