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 (DisplayName != null)
                {
                    hashCode = hashCode * 59 + DisplayName.GetHashCode();
                }

                hashCode = hashCode * 59 + EstimatedDurationInMillis.GetHashCode();
                if (FullDisplayName != null)
                {
                    hashCode = hashCode * 59 + FullDisplayName.GetHashCode();
                }
                if (FullName != null)
                {
                    hashCode = hashCode * 59 + FullName.GetHashCode();
                }
                if (Name != null)
                {
                    hashCode = hashCode * 59 + Name.GetHashCode();
                }
                if (Organization != null)
                {
                    hashCode = hashCode * 59 + Organization.GetHashCode();
                }
                if (Parameters != null)
                {
                    hashCode = hashCode * 59 + Parameters.GetHashCode();
                }
                if (Permissions != null)
                {
                    hashCode = hashCode * 59 + Permissions.GetHashCode();
                }

                hashCode = hashCode * 59 + WeatherScore.GetHashCode();
                if (PullRequest != null)
                {
                    hashCode = hashCode * 59 + PullRequest.GetHashCode();
                }
                if (Links != null)
                {
                    hashCode = hashCode * 59 + Links.GetHashCode();
                }
                if (LatestRun != null)
                {
                    hashCode = hashCode * 59 + LatestRun.GetHashCode();
                }
                return(hashCode);
            }
        }
Ejemplo n.º 2
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 (DisplayName != null)
                {
                    hashCode = hashCode * 59 + DisplayName.GetHashCode();
                }

                hashCode = hashCode * 59 + EstimatedDurationInMillis.GetHashCode();
                if (LatestRun != null)
                {
                    hashCode = hashCode * 59 + LatestRun.GetHashCode();
                }
                if (Name != null)
                {
                    hashCode = hashCode * 59 + Name.GetHashCode();
                }
                if (Organization != null)
                {
                    hashCode = hashCode * 59 + Organization.GetHashCode();
                }

                hashCode = hashCode * 59 + WeatherScore.GetHashCode();
                if (BranchNames != null)
                {
                    hashCode = hashCode * 59 + BranchNames.GetHashCode();
                }

                hashCode = hashCode * 59 + NumberOfFailingBranches.GetHashCode();

                hashCode = hashCode * 59 + NumberOfFailingPullRequests.GetHashCode();

                hashCode = hashCode * 59 + NumberOfSuccessfulBranches.GetHashCode();

                hashCode = hashCode * 59 + NumberOfSuccessfulPullRequests.GetHashCode();

                hashCode = hashCode * 59 + TotalNumberOfBranches.GetHashCode();

                hashCode = hashCode * 59 + TotalNumberOfPullRequests.GetHashCode();
                if (Class != null)
                {
                    hashCode = hashCode * 59 + Class.GetHashCode();
                }
                return(hashCode);
            }
        }
Ejemplo n.º 3
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 (Artifacts != null)
                {
                    hashCode = hashCode * 59 + Artifacts.GetHashCode();
                }

                hashCode = hashCode * 59 + DurationInMillis.GetHashCode();

                hashCode = hashCode * 59 + EstimatedDurationInMillis.GetHashCode();
                if (EnQueueTime != null)
                {
                    hashCode = hashCode * 59 + EnQueueTime.GetHashCode();
                }
                if (EndTime != null)
                {
                    hashCode = hashCode * 59 + EndTime.GetHashCode();
                }
                if (Id != null)
                {
                    hashCode = hashCode * 59 + Id.GetHashCode();
                }
                if (Organization != null)
                {
                    hashCode = hashCode * 59 + Organization.GetHashCode();
                }
                if (Pipeline != null)
                {
                    hashCode = hashCode * 59 + Pipeline.GetHashCode();
                }
                if (Result != null)
                {
                    hashCode = hashCode * 59 + Result.GetHashCode();
                }
                if (RunSummary != null)
                {
                    hashCode = hashCode * 59 + RunSummary.GetHashCode();
                }
                if (StartTime != null)
                {
                    hashCode = hashCode * 59 + StartTime.GetHashCode();
                }
                if (State != null)
                {
                    hashCode = hashCode * 59 + State.GetHashCode();
                }
                if (Type != null)
                {
                    hashCode = hashCode * 59 + Type.GetHashCode();
                }
                if (CommitId != null)
                {
                    hashCode = hashCode * 59 + CommitId.GetHashCode();
                }
                if (Class != null)
                {
                    hashCode = hashCode * 59 + Class.GetHashCode();
                }
                return(hashCode);
            }
        }