Пример #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 (Timeout != null)
         {
             hashCode = hashCode * 59 + Timeout.GetHashCode();
         }
         if (TargetStartLevel != null)
         {
             hashCode = hashCode * 59 + TargetStartLevel.GetHashCode();
         }
         if (TargetStartLevelPropName != null)
         {
             hashCode = hashCode * 59 + TargetStartLevelPropName.GetHashCode();
         }
         if (Type != null)
         {
             hashCode = hashCode * 59 + Type.GetHashCode();
         }
         return(hashCode);
     }
 }
Пример #2
0
        /// <summary>
        /// Returns true if OrgApacheFelixSystemreadyImplFrameworkStartCheckProperties instances are equal
        /// </summary>
        /// <param name="other">Instance of OrgApacheFelixSystemreadyImplFrameworkStartCheckProperties to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(OrgApacheFelixSystemreadyImplFrameworkStartCheckProperties other)
        {
            if (other is null)
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return
                ((
                     Timeout == other.Timeout ||
                     Timeout != null &&
                     Timeout.Equals(other.Timeout)
                     ) &&
                 (
                     TargetStartLevel == other.TargetStartLevel ||
                     TargetStartLevel != null &&
                     TargetStartLevel.Equals(other.TargetStartLevel)
                 ) &&
                 (
                     TargetStartLevelPropName == other.TargetStartLevelPropName ||
                     TargetStartLevelPropName != null &&
                     TargetStartLevelPropName.Equals(other.TargetStartLevelPropName)
                 ) &&
                 (
                     Type == other.Type ||
                     Type != null &&
                     Type.Equals(other.Type)
                 ));
        }