/// <inheritdoc /> public TChunk this[TKey key] { get { IReadOnlyDictionaryContracts.Indexer(this, key); return(this.stage[key]); } }
/// <inheritdoc /> public bool TryGetValue(TKey key, out TValue value) { IReadOnlyDictionaryContracts.TryGetValue(key); if (this.Dictionary != null) { return(this.Dictionary.TryGetValue(key, out value)); } foreach (var item in this) { if (this.Comparer.Equals(key, this.GetKeyForItem(item))) { value = item; return(true); } } value = default(TValue); return(false); }
/// <inheritdoc /> public bool ContainsKey(TKey key) { IReadOnlyDictionaryContracts.ContainsKey(key); return(this.Contains(key)); }
/// <inheritdoc /> public bool TryGetValue(TKey key, out TChunk chunk) { IReadOnlyDictionaryContracts.TryGetValue(key); return(this.stage.TryGetValue(key, out chunk)); }