/// <summary> /// Returns an enumerator that iterates through the collection. /// </summary> /// <returns> /// A <see cref="T:System.Collections.Generic.IEnumerator`1"/> that can be used to iterate through the collection. /// </returns> public IEnumerator <KeyValuePair <TKey, TValue> > GetEnumerator() { var values = _buffer.Select(x => new KeyValuePair <TKey, TValue>(KeyInfo <TKey> .FromInt(x.Key), x.Value)); foreach (var v in values) { yield return(v); } }