/// <summary>
        /// Compares with another buffer by comparing the next item of each buffer.
        /// </summary>
        /// <param name="other">another buffer</param>
        /// <returns>the comparison of the two buffers</returns>
        public int CompareTo(RecordReaderBuffer <T> other)
        {
            int comparison = _comparer.Compare(_cache, other._cache);

            if (comparison == 0 && _stableExternalSortTempFile)
            {
                //records are the same, as a last resort, compare the file metadata
                return(Order - other.Order);
            }
            // return the comparer comparison

            return(comparison);
        }
Exemplo n.º 2
0
 /// <summary>
 /// Compares with another buffer by comparing the next item of each buffer.
 /// </summary>
 /// <param name="other">another buffer</param>
 /// <returns>the comparison of the two buffers</returns>
 public int CompareTo(RecordReaderBuffer <T> other)
 {
     return(_comparer.Compare(_cache, other._cache));
 }