public IEnumerator <KeyValuePair <TKey, TValue> > GetEnumerator() { for (int i = 0; i < Count; i++) { TKey key = KeyFormatter.Deserialize(ref _reader, ref _context); if (IsOnlyReadFieldOffset) { BssomFieldOffsetInfo offset = new BssomFieldOffsetInfo(_reader.Position); yield return(new KeyValuePair <TKey, TValue>(key, Unsafe.As <BssomFieldOffsetInfo, TValue>(ref offset))); } else { yield return(new KeyValuePair <TKey, TValue>(key, ValueFormatter.Deserialize(ref _reader, ref _context))); } } }