public TValue this[TKey key] { get { if (key == null) { throw new ArgumentNullException(nameof(key)); } var found = _root.Find(key.GetHashCode()) ?? Enumerable.Empty <KeyValuePair <TKey, TValue> >(); foreach (var i in found) { if (i.Key.Equals(key)) { return(i.Value); } } throw ExceptionHelper.GetKeyNotFoundException(key); } }
public bool Contains(T item) { var items = _root.Find(item.GetHashCode()); return(items != null && items.Contains(item)); }