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

            hash = (hash * 397) ^ UserID.GetHashCode();
            hash = (hash * 397) ^ PageName.GetHashCode();

            return(hash);
        }
Пример #2
0
 /// <summary>
 /// Gets the hash code
 /// </summary>
 /// <returns>Returns HashCode</returns>
 public override int GetHashCode()
 {
     return(String.Format("{0}|{1}|{2}|",
                          this.Sections.Aggregate(0, (acc, next) => acc += (next != null ? next.GetHashCode() : 0)),
                          PageName?.GetHashCode() ?? 0,
                          PromoteAsNewsArticle.GetHashCode(),
                          Overwrite.GetHashCode()
                          ).GetHashCode());
 }
Пример #3
0
 /// <summary>
 /// Returns a hash code for this instance.
 /// </summary>
 /// <returns>
 /// A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table.
 /// </returns>
 public override int GetHashCode()
 {
     return((AreaName?.GetHashCode() ?? 0) ^
            (PageName?.GetHashCode() ?? 0));
 }