public static BiDictionary <TKey, TValue> ToBiDictionary <TItem, TKey, TValue>(this IEnumerable <TItem> @this, Func <TItem, TKey> keySelector, Func <TItem, TValue> valueSelector)
        {
#if NET40
            Contract.Requires(@this != null);
            Contract.Requires(keySelector != null);
            Contract.Requires(valueSelector != null);
#endif
            var result = new BiDictionary <TKey, TValue>();
            foreach (var item in @this)
            {
                result.Add(keySelector(item), valueSelector(item));
            }

            return(result);
        }
 internal Collection(BiDictionary <TLeft, TRight> dictionary) => Dictionary = dictionary;
 public ReverseDictionary(BiDictionary <TFirst, TSecond> owner)
 {
     this._owner = owner;
 }
 internal InverseDictionary(BiDictionary <TLeft, TRight> dictionary)
 {
     Inverse = dictionary;
 }