Exemplo 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 (Enabled != null)
         {
             hashCode = hashCode * 59 + Enabled.GetHashCode();
         }
         if (IntervalSeconds != null)
         {
             hashCode = hashCode * 59 + IntervalSeconds.GetHashCode();
         }
         if (CommitsPerIntervalThreshold != null)
         {
             hashCode = hashCode * 59 + CommitsPerIntervalThreshold.GetHashCode();
         }
         if (MaxLocationLength != null)
         {
             hashCode = hashCode * 59 + MaxLocationLength.GetHashCode();
         }
         if (MaxDetailsShown != null)
         {
             hashCode = hashCode * 59 + MaxDetailsShown.GetHashCode();
         }
         if (MinDetailsPercentage != null)
         {
             hashCode = hashCode * 59 + MinDetailsPercentage.GetHashCode();
         }
         if (ThreadMatchers != null)
         {
             hashCode = hashCode * 59 + ThreadMatchers.GetHashCode();
         }
         if (MaxGreedyDepth != null)
         {
             hashCode = hashCode * 59 + MaxGreedyDepth.GetHashCode();
         }
         if (GreedyStackMatchers != null)
         {
             hashCode = hashCode * 59 + GreedyStackMatchers.GetHashCode();
         }
         if (StackFilters != null)
         {
             hashCode = hashCode * 59 + StackFilters.GetHashCode();
         }
         if (StackMatchers != null)
         {
             hashCode = hashCode * 59 + StackMatchers.GetHashCode();
         }
         if (StackCategorizers != null)
         {
             hashCode = hashCode * 59 + StackCategorizers.GetHashCode();
         }
         if (StackShorteners != null)
         {
             hashCode = hashCode * 59 + StackShorteners.GetHashCode();
         }
         return(hashCode);
     }
 }
Exemplo n.º 2
0
        /// <summary>
        /// Returns true if ComAdobeGraniteRepositoryImplCommitStatsConfigProperties instances are equal
        /// </summary>
        /// <param name="other">Instance of ComAdobeGraniteRepositoryImplCommitStatsConfigProperties to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(ComAdobeGraniteRepositoryImplCommitStatsConfigProperties other)
        {
            if (other is null)
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return
                ((
                     Enabled == other.Enabled ||
                     Enabled != null &&
                     Enabled.Equals(other.Enabled)
                     ) &&
                 (
                     IntervalSeconds == other.IntervalSeconds ||
                     IntervalSeconds != null &&
                     IntervalSeconds.Equals(other.IntervalSeconds)
                 ) &&
                 (
                     CommitsPerIntervalThreshold == other.CommitsPerIntervalThreshold ||
                     CommitsPerIntervalThreshold != null &&
                     CommitsPerIntervalThreshold.Equals(other.CommitsPerIntervalThreshold)
                 ) &&
                 (
                     MaxLocationLength == other.MaxLocationLength ||
                     MaxLocationLength != null &&
                     MaxLocationLength.Equals(other.MaxLocationLength)
                 ) &&
                 (
                     MaxDetailsShown == other.MaxDetailsShown ||
                     MaxDetailsShown != null &&
                     MaxDetailsShown.Equals(other.MaxDetailsShown)
                 ) &&
                 (
                     MinDetailsPercentage == other.MinDetailsPercentage ||
                     MinDetailsPercentage != null &&
                     MinDetailsPercentage.Equals(other.MinDetailsPercentage)
                 ) &&
                 (
                     ThreadMatchers == other.ThreadMatchers ||
                     ThreadMatchers != null &&
                     ThreadMatchers.Equals(other.ThreadMatchers)
                 ) &&
                 (
                     MaxGreedyDepth == other.MaxGreedyDepth ||
                     MaxGreedyDepth != null &&
                     MaxGreedyDepth.Equals(other.MaxGreedyDepth)
                 ) &&
                 (
                     GreedyStackMatchers == other.GreedyStackMatchers ||
                     GreedyStackMatchers != null &&
                     GreedyStackMatchers.Equals(other.GreedyStackMatchers)
                 ) &&
                 (
                     StackFilters == other.StackFilters ||
                     StackFilters != null &&
                     StackFilters.Equals(other.StackFilters)
                 ) &&
                 (
                     StackMatchers == other.StackMatchers ||
                     StackMatchers != null &&
                     StackMatchers.Equals(other.StackMatchers)
                 ) &&
                 (
                     StackCategorizers == other.StackCategorizers ||
                     StackCategorizers != null &&
                     StackCategorizers.Equals(other.StackCategorizers)
                 ) &&
                 (
                     StackShorteners == other.StackShorteners ||
                     StackShorteners != null &&
                     StackShorteners.Equals(other.StackShorteners)
                 ));
        }