Exemplo n.º 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?.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);
     }
 }
Exemplo n.º 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 != 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);
     }
 }