Ejemplo n.º 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 (Name != null)
         {
             hashCode = hashCode * 59 + Name.GetHashCode();
         }
         if (Url != null)
         {
             hashCode = hashCode * 59 + Url.GetHashCode();
         }
         if (Color != null)
         {
             hashCode = hashCode * 59 + Color.GetHashCode();
         }
         if (Actions != null)
         {
             hashCode = hashCode * 59 + Actions.GetHashCode();
         }
         if (Description != null)
         {
             hashCode = hashCode * 59 + Description.GetHashCode();
         }
         if (DisplayName != null)
         {
             hashCode = hashCode * 59 + DisplayName.GetHashCode();
         }
         if (DisplayNameOrNull != null)
         {
             hashCode = hashCode * 59 + DisplayNameOrNull.GetHashCode();
         }
         if (FullDisplayName != null)
         {
             hashCode = hashCode * 59 + FullDisplayName.GetHashCode();
         }
         if (FullName != null)
         {
             hashCode = hashCode * 59 + FullName.GetHashCode();
         }
         if (Buildable != null)
         {
             hashCode = hashCode * 59 + Buildable.GetHashCode();
         }
         if (Builds != null)
         {
             hashCode = hashCode * 59 + Builds.GetHashCode();
         }
         if (FirstBuild != null)
         {
             hashCode = hashCode * 59 + FirstBuild.GetHashCode();
         }
         if (HealthReport != null)
         {
             hashCode = hashCode * 59 + HealthReport.GetHashCode();
         }
         if (InQueue != null)
         {
             hashCode = hashCode * 59 + InQueue.GetHashCode();
         }
         if (KeepDependencies != null)
         {
             hashCode = hashCode * 59 + KeepDependencies.GetHashCode();
         }
         if (LastBuild != null)
         {
             hashCode = hashCode * 59 + LastBuild.GetHashCode();
         }
         if (LastCompletedBuild != null)
         {
             hashCode = hashCode * 59 + LastCompletedBuild.GetHashCode();
         }
         if (LastFailedBuild != null)
         {
             hashCode = hashCode * 59 + LastFailedBuild.GetHashCode();
         }
         if (LastStableBuild != null)
         {
             hashCode = hashCode * 59 + LastStableBuild.GetHashCode();
         }
         if (LastSuccessfulBuild != null)
         {
             hashCode = hashCode * 59 + LastSuccessfulBuild.GetHashCode();
         }
         if (LastUnstableBuild != null)
         {
             hashCode = hashCode * 59 + LastUnstableBuild.GetHashCode();
         }
         if (LastUnsuccessfulBuild != null)
         {
             hashCode = hashCode * 59 + LastUnsuccessfulBuild.GetHashCode();
         }
         if (NextBuildNumber != null)
         {
             hashCode = hashCode * 59 + NextBuildNumber.GetHashCode();
         }
         if (QueueItem != null)
         {
             hashCode = hashCode * 59 + QueueItem.GetHashCode();
         }
         if (ConcurrentBuild != null)
         {
             hashCode = hashCode * 59 + ConcurrentBuild.GetHashCode();
         }
         if (Scm != null)
         {
             hashCode = hashCode * 59 + Scm.GetHashCode();
         }
         return(hashCode);
     }
 }