/// <summary>
 /// Reads the next available value.
 /// </summary>
 /// <param name="key"></param>
 /// <param name="value"></param>
 /// <returns></returns>
 public void Read(TKey key, TValue value)
 {
     if (IsValid)
     {
         IsValid = false;
         CacheKey.CopyTo(key);
         CacheValue.CopyTo(value);
         return;
     }
     throw new Exception("Cache is not valid. Programming Error.");
 }
 /// <summary>
 /// Writes this value back to the point buffer.
 /// </summary>
 /// <param name="key"></param>
 /// <param name="value"></param>
 public void WriteToCache(TKey key, TValue value)
 {
     IsValid = true;
     key.CopyTo(CacheKey);
     value.CopyTo(CacheValue);
 }