Beispiel #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 (Class != null)
         {
             hashCode = hashCode * 59 + Class.GetHashCode();
         }
         if (Links != null)
         {
             hashCode = hashCode * 59 + Links.GetHashCode();
         }
         if (DefaultBranch != null)
         {
             hashCode = hashCode * 59 + DefaultBranch.GetHashCode();
         }
         if (Description != null)
         {
             hashCode = hashCode * 59 + Description.GetHashCode();
         }
         if (Name != null)
         {
             hashCode = hashCode * 59 + Name.GetHashCode();
         }
         if (Permissions != null)
         {
             hashCode = hashCode * 59 + Permissions.GetHashCode();
         }
         if (Private != null)
         {
             hashCode = hashCode * 59 + Private.GetHashCode();
         }
         if (FullName != null)
         {
             hashCode = hashCode * 59 + FullName.GetHashCode();
         }
         return(hashCode);
     }
 }
 public override int GetHashCode()
 {
     unchecked
     {
         return((Id != null ? Id.GetHashCode() : 0) ^ (Owner != null ? Owner.GetHashCode() : 0) ^ (Name != null ? Name.GetHashCode() : 0) ^ (FullName != null ? FullName.GetHashCode() : 0) ^ (Description != null ? Description.GetHashCode() : 0) ^ (Private != null ? Private.GetHashCode() : 0) ^ (Fork != null ? Fork.GetHashCode() : 0) ^ (Url != null ? Url.GetHashCode() : 0) ^ (Homepage != null ? Homepage.GetHashCode() : 0) ^ (Language != null ? Language.GetHashCode() : 0) ^ (Forks != null ? Forks.GetHashCode() : 0) ^ (ForksCount != null ? ForksCount.GetHashCode() : 0) ^ (Watchers != null ? Watchers.GetHashCode() : 0) ^ (WatchersCount != null ? WatchersCount.GetHashCode() : 0) ^ (SubscribersCount != null ? SubscribersCount.GetHashCode() : 0) ^ (Size != null ? Size.GetHashCode() : 0) ^ (DefaultBranch != null ? DefaultBranch.GetHashCode() : 0) ^ (OpenIssues != null ? OpenIssues.GetHashCode() : 0) ^ (PushedAt != null ? PushedAt.GetHashCode() : 0) ^ (CreatedAt != null ? CreatedAt.GetHashCode() : 0) ^ (UpdatedAt != null ? UpdatedAt.GetHashCode() : 0) ^ (StargazersCount != null ? StargazersCount.GetHashCode() : 0) ^ (Organization != null ? Organization.GetHashCode() : 0) ^ (Source != null ? Source.GetHashCode() : 0) ^ (Parent != null ? Parent.GetHashCode() : 0) ^ (HasIssues != null ? HasIssues.GetHashCode() : 0) ^ (HasWiki != null ? HasWiki.GetHashCode() : 0) ^ (HasDownloads != null ? HasDownloads.GetHashCode() : 0) ^ (HtmlUrl != null ? HtmlUrl.GetHashCode() : 0) ^ (Permissions != null ? Permissions.GetHashCode() : 0));
     }
 }