Exemplo n.º 1
0
        public override int GetHashCode()
        {
            if (hashcode.HasValue)
            {
                return(hashcode.Value);
            }

            unchecked
            {
                hashcode = (int)2166136261;
                hashcode = hashcode * 1677619 + (LocalBranch?.GetHashCode() ?? 0);
                hashcode = hashcode * 1677619 + (RemoteBranch?.GetHashCode() ?? 0);
                hashcode = hashcode * 1677619 + Ahead.GetHashCode();
                hashcode = hashcode * 1677619 + Behind.GetHashCode();
                foreach (var entry in Entries)
                {
                    hashcode = hashcode * 1677619 + entry.GetHashCode();
                }
                return(hashcode.Value);
            }
        }
Exemplo n.º 2
0
 /// <summary>
 /// Return the HashCode of this object.
 /// </summary>
 /// <returns>The HashCode of this object.</returns>
 public override Int32 GetHashCode()
 {
     return(Left.GetHashCode() ^ 1 + Top.GetHashCode() ^ 2 + Front.GetHashCode() ^ 3 + Right.GetHashCode() ^ 4 + Bottom.GetHashCode() ^ 5 + Behind.GetHashCode());
 }