Ejemplo n.º 1
0
 /// <summary>Add an element to the dictionary.</summary>
 /// <param name="key"></param>
 /// <param name="value"></param>
 public void Add(Aggregate <TKey1, TKey2> key, TValue value)
 {
     GetDictionary2(key.Item1).Add(key.Item2, value);
 }
Ejemplo n.º 2
0
 /// <summary>Get whether the bidictionary contains this specific combination of values.</summary>
 /// <param name="item"></param>
 /// <returns></returns>
 public bool Contains(Aggregate <A, B> item)
 {
     return(Contains(item.Item1, item.Item2));
 }
Ejemplo n.º 3
0
 /// <summary>Get or set an element of the dictionary.</summary>
 /// <param name="key"></param>
 /// <returns></returns>
 public TValue this[Aggregate <TKey1, TKey2> key] {
     get { return(Dictionary1[key.Item1][key.Item2]); }
     set { Dictionary1.GetValueOrCreate(key.Item1)[key.Item2] = value; }
 }
Ejemplo n.º 4
0
 /// <summary>Add a pair of values to the bidictionary, throwing an exception if either is already in the bidictionary.</summary>
 /// <param name="item"></param>
 public void Add(Aggregate <A, B> item)
 {
     Add(item.Item1, item.Item2);
 }