Пример #1
0
 /// <summary>
 /// Serves as a hash function for a particular type.
 /// </summary>
 /// <returns>
 /// A hash code for the current <see cref="T:System.Object"/>.
 /// </returns>
 public override int GetHashCode()
 {
     unchecked
     {
         var hashCode = (Fn != null ? Fn.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (Email != null ? Email.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (Url != null ? Url.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (Org != null ? Org.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (Adr != null ? Adr.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (Tel != null ? Tel.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (XTwitter != null ? XTwitter.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (XGithub != null ? XGithub.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (Photo != null ? Photo.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (VCard != null ? VCard.GetHashCode() : 0);
         return(hashCode);
     }
 }
Пример #2
0
 /// <summary>
 /// Serves as a hash function for a particular type.
 /// </summary>
 /// <returns>
 /// A hash code for the current <see cref="T:System.Object"/>.
 /// </returns>
 public override int GetHashCode()
 {
     unchecked
     {
         var hashCode = Fn?.GetHashCode() ?? 0;
         hashCode = (hashCode * 397) ^ (Email?.GetHashCode() ?? 0);
         hashCode = (hashCode * 397) ^ (Url?.GetHashCode() ?? 0);
         hashCode = (hashCode * 397) ^ (Org?.GetHashCode() ?? 0);
         hashCode = (hashCode * 397) ^ (Adr?.GetHashCode() ?? 0);
         hashCode = (hashCode * 397) ^ (Tel?.GetHashCode() ?? 0);
         hashCode = (hashCode * 397) ^ (XTwitter?.GetHashCode() ?? 0);
         hashCode = (hashCode * 397) ^ (XGithub?.GetHashCode() ?? 0);
         hashCode = (hashCode * 397) ^ (Photo?.GetHashCode() ?? 0);
         hashCode = (hashCode * 397) ^ (VCard?.GetHashCode() ?? 0);
         return(hashCode);
     }
 }
Пример #3
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (Id != 0)
            {
                hash ^= Id.GetHashCode();
            }
            if (org_ != null)
            {
                hash ^= Org.GetHashCode();
            }
            if (Period != 0)
            {
                hash ^= Period.GetHashCode();
            }
            hash ^= data_.GetHashCode();
            return(hash);
        }
Пример #4
0
 public override int GetHashCode()
 {
     return(Name.GetHashCode() ^ Org.GetHashCode());
 }