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 (AsyncConfigs != null)
         {
             hashCode = hashCode * 59 + AsyncConfigs.GetHashCode();
         }
         if (LeaseTimeOutMinutes != null)
         {
             hashCode = hashCode * 59 + LeaseTimeOutMinutes.GetHashCode();
         }
         if (FailingIndexTimeoutSeconds != null)
         {
             hashCode = hashCode * 59 + FailingIndexTimeoutSeconds.GetHashCode();
         }
         if (ErrorWarnIntervalSeconds != null)
         {
             hashCode = hashCode * 59 + ErrorWarnIntervalSeconds.GetHashCode();
         }
         return(hashCode);
     }
 }
Ejemplo n.º 2
0
        /// <summary>
        /// Returns true if OrgApacheJackrabbitOakPluginsIndexAsyncIndexerServiceProperties instances are equal
        /// </summary>
        /// <param name="other">Instance of OrgApacheJackrabbitOakPluginsIndexAsyncIndexerServiceProperties to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(OrgApacheJackrabbitOakPluginsIndexAsyncIndexerServiceProperties other)
        {
            if (other is null)
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return
                ((
                     AsyncConfigs == other.AsyncConfigs ||
                     AsyncConfigs != null &&
                     AsyncConfigs.Equals(other.AsyncConfigs)
                     ) &&
                 (
                     LeaseTimeOutMinutes == other.LeaseTimeOutMinutes ||
                     LeaseTimeOutMinutes != null &&
                     LeaseTimeOutMinutes.Equals(other.LeaseTimeOutMinutes)
                 ) &&
                 (
                     FailingIndexTimeoutSeconds == other.FailingIndexTimeoutSeconds ||
                     FailingIndexTimeoutSeconds != null &&
                     FailingIndexTimeoutSeconds.Equals(other.FailingIndexTimeoutSeconds)
                 ) &&
                 (
                     ErrorWarnIntervalSeconds == other.ErrorWarnIntervalSeconds ||
                     ErrorWarnIntervalSeconds != null &&
                     ErrorWarnIntervalSeconds.Equals(other.ErrorWarnIntervalSeconds)
                 ));
        }