예제 #1
0
 internal Enumerator(UncheckedList <T> list)
 {
     this.list = list;
     index     = 0;
     version   = list._version;
     current   = default(T);
 }
예제 #2
0
        public UncheckedList <T> GetRange(int index, int count)
        {
            UncheckedList <T> list = new UncheckedList <T>(count);

            Array.Copy(_items, index, list._items, 0, count);
            list._size = count;
            return(list);
        }
예제 #3
0
        public UncheckedList <TOutput> ConvertAll <TOutput>(Converter <T, TOutput> converter)
        {
            UncheckedList <TOutput> list = new UncheckedList <TOutput>(_size);

            for (int i = 0; i < _size; i++)
            {
                list._items[i] = converter(_items[i]);
            }
            list._size = _size;
            return(list);
        }
예제 #4
0
            public bool MoveNext()
            {
                UncheckedList <T> localUncheckedList = list;

                if (version == localUncheckedList._version && ((uint)index < (uint)localUncheckedList._size))
                {
                    current = localUncheckedList._items[index];
                    index++;
                    return(true);
                }
                return(MoveNextRare());
            }
예제 #5
0
        public UncheckedList <T> FindAll(Predicate <T> match)
        {
            UncheckedList <T> list = new UncheckedList <T>();

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