Esempio n. 1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="T:NFS.Collections.MultiDictionary`2"/> class.
 /// </summary>
 /// <param name="capacity">Capacity.</param>
 /// <param name="keyEqualityComparer">Key equality comparer.</param>
 /// <param name="valueEqualityComparer">Value equality comparer.</param>
 public MultiDictionary(int capacity = 0, IEqualityComparer <TKey> keyEqualityComparer = null, IEqualityComparer <TValue> valueEqualityComparer = null)
 {
     RuntimeAssert.ArgumentInRange(capacity, 0, int.MaxValue, nameof(capacity));
     if (capacity > 0)
     {
         Initialize(capacity);
     }
     _keyComparer   = keyEqualityComparer ?? EqualityComparer <TKey> .Default;
     _valueComparer = valueEqualityComparer ?? EqualityComparer <TValue> .Default;
 }