Ejemplo n.º 1
0
 /// <summary>
 /// Constructs a new <see cref="OrderedDictionary{TKey, TValue}"></see>
 /// instance.
 /// </summary>
 /// <param name="comparer">Comparer to used when looking up items in
 /// the dictionary.</param>
 public OrderedDictionary(IEqualityComparer <TKey> comparer)
 {
     Items       = new List <TValue>();
     IndexLookup = new Dictionary <TKey, int>(comparer);
     ByIndex     = new ListIndexer <TValue>(Items);
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Constructs a new <see cref="OrderedDictionary{TKey, TValue}"></see>
 /// instance.
 /// </summary>
 public OrderedDictionary()
 {
     Items       = new List <TValue>();
     IndexLookup = new Dictionary <TKey, int>();
     ByIndex     = new ListIndexer <TValue>(Items);
 }