Пример #1
0
 /// <summary>
 /// Gets the hash code
 /// </summary>
 /// <returns>Hash code</returns>
 public override int GetHashCode()
 {
     unchecked // Overflow is fine, just wrap
     {
         var hashCode = 41;
         // Suitable nullity checks etc, of course :)
         if (PageIndex != null)
         {
             hashCode = hashCode * 59 + PageIndex.GetHashCode();
         }
         if (TotalPages != null)
         {
             hashCode = hashCode * 59 + TotalPages.GetHashCode();
         }
         if (PageSize != null)
         {
             hashCode = hashCode * 59 + PageSize.GetHashCode();
         }
         if (Items != null)
         {
             hashCode = hashCode * 59 + Items.GetHashCode();
         }
         return(hashCode);
     }
 }
Пример #2
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (PageIndex != 0)
            {
                hash ^= PageIndex.GetHashCode();
            }
            if (PageSize != 0)
            {
                hash ^= PageSize.GetHashCode();
            }
            if (Total != 0)
            {
                hash ^= Total.GetHashCode();
            }
            if (Skip != 0)
            {
                hash ^= Skip.GetHashCode();
            }
            hash ^= Sort.GetHashCode();
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }
Пример #3
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (LibraryId.Length != 0)
            {
                hash ^= LibraryId.GetHashCode();
            }
            if (PageIndex != 0)
            {
                hash ^= PageIndex.GetHashCode();
            }
            if (PageSize != 0)
            {
                hash ^= PageSize.GetHashCode();
            }
            if (SearchText.Length != 0)
            {
                hash ^= SearchText.GetHashCode();
            }
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }
Пример #4
0
        public override int GetHashCode()
        {
            unchecked
            {
                int hash = PageIndex.GetHashCode();
                hash = 31 * hash + PageSize.GetHashCode();

                //for performance, just calculate Count of list
                hash = 31 * hash + OrderOptions.Count.GetHashCode();
                hash = 31 * hash + WhereOptions.Count.GetHashCode();
                return(hash);
            }
        }
Пример #5
0
        public override int GetHashCode()
        {
            int hashCode = -1859068553;

            hashCode = hashCode * -1521134295 + EqualityComparer <ICollection <SearchyCondition> > .Default.GetHashCode(Conditions);

            hashCode = hashCode * -1521134295 + EqualityComparer <ICollection <SearchySort> > .Default.GetHashCode(Sorts);

            hashCode = hashCode * -1521134295 + PageSize.GetHashCode();
            hashCode = hashCode * -1521134295 + PageIndex.GetHashCode();
            hashCode = hashCode * -1521134295 + CountRows.GetHashCode();
            return(hashCode);
        }
Пример #6
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (PageIndex != 0)
            {
                hash ^= PageIndex.GetHashCode();
            }
            if (PageSize != 0)
            {
                hash ^= PageSize.GetHashCode();
            }
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }