コード例 #1
0
ファイル: HealthInfo.cs プロジェクト: ptrstpp950/smilr
        /// <summary>
        /// Returns true if HealthInfo instances are equal
        /// </summary>
        /// <param name="other">Instance of HealthInfo to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(HealthInfo other)
        {
            if (ReferenceEquals(null, other))
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return
                ((
                     Status == other.Status ||
                     Status != null &&
                     Status.Equals(other.Status)
                     ) &&
                 (
                     Version == other.Version ||
                     Version != null &&
                     Version.Equals(other.Version)
                 ) &&
                 (
                     ReleaseID == other.ReleaseID ||
                     ReleaseID != null &&
                     ReleaseID.Equals(other.ReleaseID)
                 ) &&
                 (
                     Description == other.Description ||
                     Description != null &&
                     Description.Equals(other.Description)
                 ) &&
                 (
                     Debug == other.Debug ||
                     Debug != null &&
                     Debug.Equals(other.Debug)
                 ) &&
                 (
                     DebugHostInfo == other.DebugHostInfo ||
                     DebugHostInfo != null &&
                     DebugHostInfo.Equals(other.DebugHostInfo)
                 ) &&
                 (
                     DebugNodeInfo == other.DebugNodeInfo ||
                     DebugNodeInfo != null &&
                     DebugNodeInfo.Equals(other.DebugNodeInfo)
                 ) &&
                 (
                     DebugRuntimeInfo == other.DebugRuntimeInfo ||
                     DebugRuntimeInfo != null &&
                     DebugRuntimeInfo.Equals(other.DebugRuntimeInfo)
                 ) &&
                 (
                     DebugMongoInfo == other.DebugMongoInfo ||
                     DebugMongoInfo != null &&
                     DebugMongoInfo.Equals(other.DebugMongoInfo)
                 ));
        }
コード例 #2
0
ファイル: HealthInfo.cs プロジェクト: ptrstpp950/smilr
 /// <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 (Status != null)
         {
             hashCode = hashCode * 59 + Status.GetHashCode();
         }
         if (Version != null)
         {
             hashCode = hashCode * 59 + Version.GetHashCode();
         }
         if (ReleaseID != null)
         {
             hashCode = hashCode * 59 + ReleaseID.GetHashCode();
         }
         if (Description != null)
         {
             hashCode = hashCode * 59 + Description.GetHashCode();
         }
         if (Debug != null)
         {
             hashCode = hashCode * 59 + Debug.GetHashCode();
         }
         if (DebugHostInfo != null)
         {
             hashCode = hashCode * 59 + DebugHostInfo.GetHashCode();
         }
         if (DebugNodeInfo != null)
         {
             hashCode = hashCode * 59 + DebugNodeInfo.GetHashCode();
         }
         if (DebugRuntimeInfo != null)
         {
             hashCode = hashCode * 59 + DebugRuntimeInfo.GetHashCode();
         }
         if (DebugMongoInfo != null)
         {
             hashCode = hashCode * 59 + DebugMongoInfo.GetHashCode();
         }
         return(hashCode);
     }
 }
コード例 #3
0
 public Releases(Release r)
 {
     this.ReleaseName = r.Name;
     this.AccountName = r.Account.Name;
     this.ReleaseID   = r.ReleaseID;
     this.PrepFPName  = r.Account.PrepFPName;
     PREP.DAL.Models.Employee SPNameEmployeeTmp = r.ReleaseStakeholders.Any(rsh => rsh.StakeholderID == 6) ? r.ReleaseStakeholders.Where(rsh => rsh.StakeholderID == 6).FirstOrDefault().Employee1 : null;
     this.SPNameEmployee = SPNameEmployeeTmp != null ? SPNameEmployeeTmp.FirstName + " " + SPNameEmployeeTmp.LastName : null;
     PREP.DAL.Models.Employee ProgramMeEmployeeTmp = r.ReleaseStakeholders.Any(rsh => rsh.StakeholderID == 7) ? r.ReleaseStakeholders.Where(rsh => rsh.StakeholderID == 7).FirstOrDefault().Employee1 : null;
     this.ProgramMeEmployee   = ProgramMeEmployeeTmp != null ? ProgramMeEmployeeTmp.FirstName + " " + ProgramMeEmployeeTmp.LastName : null;
     this.ProductionStartDate = r.ReleaseMilestones.Any(m => m.MilestoneID == 12) ? String.Format("{0:d-MMM-yyyy}", r.ReleaseMilestones.Where(m => m.MilestoneID == 12).FirstOrDefault().MilestoneDate) : null;
     this.PrepReviewMode      = "Full";
     this.CheckListLnk        = "@Html.ActionLink('Checklist >>' ,'' , new { id = " + ReleaseID.ToString() + " })";
     //  this.PrepFPName=r.ReleaseStakeholders.
 }