protected override bool ReadNext(TKey key, TValue value) { TryAgain: if (!m_baseStream.Read(key, value)) { return(false); } if (m_isLastValueValid && key.IsEqualTo(m_lastKey)) { goto TryAgain; } m_isLastValueValid = true; key.CopyTo(m_lastKey); value.CopyTo(m_lastValue); return(true); }
/// <summary> /// Reads the next value of the stream. /// </summary> public void ReadToCache() { IsValid = Stream.Read(CacheKey, CacheValue); }