コード例 #1
0
        /// <summary>
        /// Compares this index with another index for equality.
        /// </summary>
        /// <remarks>
        /// This method returns true if this index and the specified index have
        /// exactly the same contents.
        /// </remarks>
        /// <param name="index">
        /// index to compare this index with.
        /// </param>
        /// <returns>
        /// <c>true</c> if the two indexes are equal; <c>false</c> otherwise.
        /// </returns>
        public override bool Equals(SimpleCacheIndex index)
        {
            if (!base.Equals(index) || !(index is ConditionalIndex))
            {
                return(false);
            }

            var that = index as ConditionalIndex;

            return(Equals(Filter, that.Filter) &&
                   IsForwardIndexSupported == that.IsForwardIndexSupported);
        }
コード例 #2
0
 /// <summary>
 /// Compares this index with another index for equality.
 /// </summary>
 /// <remarks>
 /// This method returns true if this index and the specified index have
 /// exactly the same contents.
 /// </remarks>
 /// <param name="index">
 /// index to compare this index with.
 /// </param>
 /// <returns>
 /// <c>true</c> if the two indexes are equal; <c>false</c> otherwise.
 /// </returns>
 public virtual bool Equals(SimpleCacheIndex index)
 {
     return(Equals(Comparer, index.Comparer) &&
            Equals(ValueExtractor, index.ValueExtractor) &&
            IsOrdered == index.IsOrdered);
 }