Esempio 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 (PoolName != null)
         {
             hashCode = hashCode * 59 + PoolName.GetHashCode();
         }
         if (AllowedPoolNames != null)
         {
             hashCode = hashCode * 59 + AllowedPoolNames.GetHashCode();
         }
         if (SchedulerUseleaderforsingle != null)
         {
             hashCode = hashCode * 59 + SchedulerUseleaderforsingle.GetHashCode();
         }
         if (MetricsFilters != null)
         {
             hashCode = hashCode * 59 + MetricsFilters.GetHashCode();
         }
         if (SlowThresholdMillis != null)
         {
             hashCode = hashCode * 59 + SlowThresholdMillis.GetHashCode();
         }
         return(hashCode);
     }
 }
Esempio n. 2
0
        /// <summary>
        /// Returns true if OrgApacheSlingCommonsSchedulerImplQuartzSchedulerProperties instances are equal
        /// </summary>
        /// <param name="other">Instance of OrgApacheSlingCommonsSchedulerImplQuartzSchedulerProperties to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(OrgApacheSlingCommonsSchedulerImplQuartzSchedulerProperties other)
        {
            if (other is null)
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return
                ((
                     PoolName == other.PoolName ||
                     PoolName != null &&
                     PoolName.Equals(other.PoolName)
                     ) &&
                 (
                     AllowedPoolNames == other.AllowedPoolNames ||
                     AllowedPoolNames != null &&
                     AllowedPoolNames.Equals(other.AllowedPoolNames)
                 ) &&
                 (
                     SchedulerUseleaderforsingle == other.SchedulerUseleaderforsingle ||
                     SchedulerUseleaderforsingle != null &&
                     SchedulerUseleaderforsingle.Equals(other.SchedulerUseleaderforsingle)
                 ) &&
                 (
                     MetricsFilters == other.MetricsFilters ||
                     MetricsFilters != null &&
                     MetricsFilters.Equals(other.MetricsFilters)
                 ) &&
                 (
                     SlowThresholdMillis == other.SlowThresholdMillis ||
                     SlowThresholdMillis != null &&
                     SlowThresholdMillis.Equals(other.SlowThresholdMillis)
                 ));
        }