コード例 #1
0
        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);
        }
コード例 #2
0
 /// <summary>
 /// Reads the next value of the stream.
 /// </summary>
 public void ReadToCache()
 {
     IsValid = Stream.Read(CacheKey, CacheValue);
 }