Exemple #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 (Id != null)
                {
                    hashCode = hashCode * 59 + Id.GetHashCode();
                }
                if (StepId != null)
                {
                    hashCode = hashCode * 59 + StepId.GetHashCode();
                }
                if (PhaseId != null)
                {
                    hashCode = hashCode * 59 + PhaseId.GetHashCode();
                }
                if (Action != null)
                {
                    hashCode = hashCode * 59 + Action.GetHashCode();
                }
                if (Repository != null)
                {
                    hashCode = hashCode * 59 + Repository.GetHashCode();
                }
                if (Branch != null)
                {
                    hashCode = hashCode * 59 + Branch.GetHashCode();
                }
                if (Environment != null)
                {
                    hashCode = hashCode * 59 + Environment.GetHashCode();
                }
                if (EnvironmentType != null)
                {
                    hashCode = hashCode * 59 + EnvironmentType.GetHashCode();
                }
                if (StartedAt != null)
                {
                    hashCode = hashCode * 59 + StartedAt.GetHashCode();
                }
                if (FinishedAt != null)
                {
                    hashCode = hashCode * 59 + FinishedAt.GetHashCode();
                }
                if (Details != null)
                {
                    hashCode = hashCode * 59 + Details.GetHashCode();
                }

                hashCode = hashCode * 59 + Status.GetHashCode();
                if (Links != null)
                {
                    hashCode = hashCode * 59 + Links.GetHashCode();
                }
                return(hashCode);
            }
        }
Exemple #2
0
 public override int GetHashCode()
 {
     return(PhaseId.GetHashCode());
 }