示例#1
0
文件: IndexQuery.cs 项目: mow/ravendb
 public override int GetHashCode()
 {
     unchecked
     {
         var hashCode = PageSizeSet.GetHashCode();
         hashCode = (hashCode * 397) ^ (Query != null ? Query.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (TotalSize != null ? TotalSize.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (TransformerParameters != null ? TransformerParameters.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ Start;
         hashCode = (hashCode * 397) ^ (IsDistinct ? 1 : 0);
         hashCode = (hashCode * 397) ^ (FieldsToFetch != null ? FieldsToFetch.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (SortedFields != null ? SortedFields.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (SortHints != null ? SortHints.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ Cutoff.GetHashCode();
         hashCode = (hashCode * 397) ^ WaitForNonStaleResultsAsOfNow.GetHashCode();
         hashCode = (hashCode * 397) ^ (CutoffEtag != null ? CutoffEtag.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (DefaultField != null ? DefaultField.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (int)DefaultOperator;
         hashCode = (hashCode * 397) ^ (SkippedResults != null ? SkippedResults.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ DebugOptionGetIndexEntries.GetHashCode();
         hashCode = (hashCode * 397) ^ (HighlightedFields != null ? HighlightedFields.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (HighlighterPreTags != null ? HighlighterPreTags.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (HighlighterPostTags != null ? HighlighterPostTags.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (HighlighterKeyName != null ? HighlighterKeyName.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (ResultsTransformer != null ? ResultsTransformer.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (ShowTimings ? 1 : 0);
         hashCode = (hashCode * 397) ^ DisableCaching.GetHashCode();
         return(hashCode);
     }
 }
示例#2
0
文件: IndexQuery.cs 项目: mow/ravendb
 public bool Equals(IndexQuery other)
 {
     if (ReferenceEquals(null, other))
     {
         return(false);
     }
     if (ReferenceEquals(this, other))
     {
         return(true);
     }
     return(PageSizeSet.Equals(other.PageSizeSet) &&
            String.Equals(Query, other.Query) &&
            Equals(TotalSize, other.TotalSize) &&
            Equals(TransformerParameters, other.TransformerParameters) &&
            Start == other.Start &&
            Equals(IsDistinct, other.IsDistinct) &&
            Equals(FieldsToFetch, other.FieldsToFetch) &&
            Equals(SortedFields, other.SortedFields) &&
            Equals(SortHints, other.SortHints) &&
            Cutoff.Equals(other.Cutoff) &&
            WaitForNonStaleResultsAsOfNow.Equals(other.WaitForNonStaleResultsAsOfNow) &&
            WaitForNonStaleResults.Equals(other.WaitForNonStaleResults) &&
            Equals(CutoffEtag, other.CutoffEtag) &&
            String.Equals(DefaultField, other.DefaultField) &&
            DefaultOperator == other.DefaultOperator &&
            Equals(SkippedResults, other.SkippedResults) &&
            DebugOptionGetIndexEntries.Equals(other.DebugOptionGetIndexEntries) &&
            Equals(HighlightedFields, other.HighlightedFields) &&
            Equals(HighlighterPreTags, other.HighlighterPreTags) &&
            Equals(HighlighterPostTags, other.HighlighterPostTags) &&
            Equals(HighlighterKeyName, other.HighlighterKeyName) &&
            String.Equals(ResultsTransformer, other.ResultsTransformer) &&
            ShowTimings == other.ShowTimings &&
            DisableCaching.Equals(other.DisableCaching));
 }