Ejemplo n.º 1
0
 public Page(int capacity)
 {
     _capacity = capacity;
     _items    = new SortedList <TKey, TValue>(capacity);
     Keys      = new Indexator <int, TKey>(index => _items.Keys[index]);
     Values    = new Indexator <int, TValue>(index => _items.Values[index]);
 }
Ejemplo n.º 2
0
        public IndexedList(int pageCapacity = 256)
        {
            Count         = 0;
            _pageCapacity = pageCapacity;
            _pages        = new List <Page>(1024);
            Pages         = new ReadOnlyCollection <Page>(_pages);

            Keys   = new Indexator <int, TKey>(GetKey);
            Values = new Indexator <int, TValue>(GetValue);
        }