/// <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); }
/// <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)); }
/// <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; } }
/// <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); }