Пример #1
0
        public override int GetHashCode()
        {
            var hash = 23;

            hash = hash * 31 + MatchCase.GetHashCode();
            hash = hash * 31 + MatchWholeWord.GetHashCode();
            hash = hash * 31 + IsRegex.GetHashCode();
            hash = hash * 31 + UseExcludeSettingsAndIgnoreFiles.GetHashCode();
            if (Query != null)
            {
                hash = hash * 31 + Query.GetHashCode();
            }
            if (WorkingDirectory != null)
            {
                hash = hash * 31 + WorkingDirectory.GetHashCode();
            }
            if (Include != null)
            {
                hash = hash * 31 + Include.GetHashCode();
            }
            if (Exclude != null)
            {
                hash = hash * 31 + Exclude.GetHashCode();
            }
            return(hash);
        }
Пример #2
0
 public override int GetHashCode()
 {
     unchecked
     {
         int hashCode = Index;
         hashCode = (hashCode * 397) ^ PageSize;
         hashCode = (hashCode * 397) ^ ShowEmpty.GetHashCode();
         hashCode = (hashCode * 397) ^ OnlySelected.GetHashCode();
         hashCode = (hashCode * 397) ^ Lang;
         hashCode = (hashCode * 397) ^ MatchWholeWord.GetHashCode();
         hashCode = (hashCode * 397) ^ (TextToFind != null ? TextToFind.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (Category != null ? Category.GetHashCode() : 0);
         return(hashCode);
     }
 }