Ejemplo n.º 1
0
        /// <summary>
        /// Returns true if HudsonMasterComputermonitorData instances are equal
        /// </summary>
        /// <param name="other">Instance of HudsonMasterComputermonitorData to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(HudsonMasterComputermonitorData other)
        {
            if (other is null)
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return
                ((
                     HudsonNodeMonitorsSwapSpaceMonitor == other.HudsonNodeMonitorsSwapSpaceMonitor ||
                     HudsonNodeMonitorsSwapSpaceMonitor != null &&
                     HudsonNodeMonitorsSwapSpaceMonitor.Equals(other.HudsonNodeMonitorsSwapSpaceMonitor)
                     ) &&
                 (
                     HudsonNodeMonitorsTemporarySpaceMonitor == other.HudsonNodeMonitorsTemporarySpaceMonitor ||
                     HudsonNodeMonitorsTemporarySpaceMonitor != null &&
                     HudsonNodeMonitorsTemporarySpaceMonitor.Equals(other.HudsonNodeMonitorsTemporarySpaceMonitor)
                 ) &&
                 (
                     HudsonNodeMonitorsDiskSpaceMonitor == other.HudsonNodeMonitorsDiskSpaceMonitor ||
                     HudsonNodeMonitorsDiskSpaceMonitor != null &&
                     HudsonNodeMonitorsDiskSpaceMonitor.Equals(other.HudsonNodeMonitorsDiskSpaceMonitor)
                 ) &&
                 (
                     HudsonNodeMonitorsArchitectureMonitor == other.HudsonNodeMonitorsArchitectureMonitor ||
                     HudsonNodeMonitorsArchitectureMonitor != null &&
                     HudsonNodeMonitorsArchitectureMonitor.Equals(other.HudsonNodeMonitorsArchitectureMonitor)
                 ) &&
                 (
                     HudsonNodeMonitorsResponseTimeMonitor == other.HudsonNodeMonitorsResponseTimeMonitor ||
                     HudsonNodeMonitorsResponseTimeMonitor != null &&
                     HudsonNodeMonitorsResponseTimeMonitor.Equals(other.HudsonNodeMonitorsResponseTimeMonitor)
                 ) &&
                 (
                     HudsonNodeMonitorsClockMonitor == other.HudsonNodeMonitorsClockMonitor ||
                     HudsonNodeMonitorsClockMonitor != null &&
                     HudsonNodeMonitorsClockMonitor.Equals(other.HudsonNodeMonitorsClockMonitor)
                 ) &&
                 (
                     Class == other.Class ||
                     Class != null &&
                     Class.Equals(other.Class)
                 ));
        }
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 (HudsonNodeMonitorsSwapSpaceMonitor != null)
         {
             hashCode = hashCode * 59 + HudsonNodeMonitorsSwapSpaceMonitor.GetHashCode();
         }
         if (HudsonNodeMonitorsTemporarySpaceMonitor != null)
         {
             hashCode = hashCode * 59 + HudsonNodeMonitorsTemporarySpaceMonitor.GetHashCode();
         }
         if (HudsonNodeMonitorsDiskSpaceMonitor != null)
         {
             hashCode = hashCode * 59 + HudsonNodeMonitorsDiskSpaceMonitor.GetHashCode();
         }
         if (HudsonNodeMonitorsArchitectureMonitor != null)
         {
             hashCode = hashCode * 59 + HudsonNodeMonitorsArchitectureMonitor.GetHashCode();
         }
         if (HudsonNodeMonitorsResponseTimeMonitor != null)
         {
             hashCode = hashCode * 59 + HudsonNodeMonitorsResponseTimeMonitor.GetHashCode();
         }
         if (HudsonNodeMonitorsClockMonitor != null)
         {
             hashCode = hashCode * 59 + HudsonNodeMonitorsClockMonitor.GetHashCode();
         }
         if (Class != null)
         {
             hashCode = hashCode * 59 + Class.GetHashCode();
         }
         return(hashCode);
     }
 }