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

            return
                ((
                     MaxItems == other.MaxItems ||
                     MaxItems != null &&
                     MaxItems.Equals(other.MaxItems)
                     ) &&
                 (
                     MaxPathDepth == other.MaxPathDepth ||
                     MaxPathDepth != null &&
                     MaxPathDepth.Equals(other.MaxPathDepth)
                 ) &&
                 (
                     Enabled == other.Enabled ||
                     Enabled != null &&
                     Enabled.Equals(other.Enabled)
                 ));
        }
コード例 #2
0
 /// <summary>
 /// Serves as a hash function for a particular type.
 /// </summary>
 /// <returns>
 /// A hash code for the current <see cref="T:System.Object"/>.
 /// </returns>
 public override int GetHashCode()
 {
     unchecked
     {
         var hashCode = Type.GetHashCode();
         hashCode = (hashCode * 397) ^ (Id?.GetHashCode() ?? 0);
         hashCode = (hashCode * 397) ^ (Schema?.GetHashCode() ?? 0);
         hashCode = (hashCode * 397) ^ (Comment?.GetHashCode() ?? 0);
         hashCode = (hashCode * 397) ^ (Title?.GetHashCode() ?? 0);
         hashCode = (hashCode * 397) ^ (Description?.GetHashCode() ?? 0);
         hashCode = (hashCode * 397) ^ (Default?.GetHashCode() ?? 0);
         hashCode = (hashCode * 397) ^ MultipleOf.GetHashCode();
         hashCode = (hashCode * 397) ^ Maximum.GetHashCode();
         hashCode = (hashCode * 397) ^ ExclusiveMaximum.GetHashCode();
         hashCode = (hashCode * 397) ^ Minimum.GetHashCode();
         hashCode = (hashCode * 397) ^ ExclusiveMinimum.GetHashCode();
         hashCode = (hashCode * 397) ^ (MaxLength?.GetHashCode() ?? 0);
         hashCode = (hashCode * 397) ^ (MinLength?.GetHashCode() ?? 0);
         hashCode = (hashCode * 397) ^ (Pattern?.GetHashCode() ?? 0);
         hashCode = (hashCode * 397) ^ (AdditionalItems?.GetHashCode() ?? 0);
         hashCode = (hashCode * 397) ^ (Items?.GetHashCode() ?? 0);
         hashCode = (hashCode * 397) ^ (MaxItems?.GetHashCode() ?? 0);
         hashCode = (hashCode * 397) ^ (MinItems?.GetHashCode() ?? 0);
         hashCode = (hashCode * 397) ^ (UniqueItems?.GetHashCode() ?? 0);
         hashCode = (hashCode * 397) ^ (Contains?.GetHashCode() ?? 0);
         hashCode = (hashCode * 397) ^ (AdditionalProperties?.GetHashCode() ?? 0);
         hashCode = (hashCode * 397) ^ (Definitions?.GetCollectionHashCode().GetHashCode() ?? 0);
         hashCode = (hashCode * 397) ^ (Properties?.GetCollectionHashCode() ?? 0);
         hashCode = (hashCode * 397) ^ (PatternProperties?.GetCollectionHashCode() ?? 0);
         hashCode = (hashCode * 397) ^ (Dependencies?.GetCollectionHashCode() ?? 0);
         hashCode = (hashCode * 397) ^ (Const?.GetHashCode() ?? 0);
         hashCode = (hashCode * 397) ^ (Enum?.GetCollectionHashCode() ?? 0);
         hashCode = (hashCode * 397) ^ (Format?.GetHashCode() ?? 0);
         hashCode = (hashCode * 397) ^ (ContentMediaType?.GetHashCode() ?? 0);
         hashCode = (hashCode * 397) ^ (ContentEncoding?.GetHashCode() ?? 0);
         hashCode = (hashCode * 397) ^ (If?.GetHashCode() ?? 0);
         hashCode = (hashCode * 397) ^ (Then?.GetHashCode() ?? 0);
         hashCode = (hashCode * 397) ^ (Else?.GetHashCode() ?? 0);
         hashCode = (hashCode * 397) ^ (AllOf?.GetCollectionHashCode() ?? 0);
         hashCode = (hashCode * 397) ^ (AnyOf?.GetCollectionHashCode() ?? 0);
         hashCode = (hashCode * 397) ^ (OneOf?.GetCollectionHashCode() ?? 0);
         hashCode = (hashCode * 397) ^ (Not?.GetHashCode() ?? 0);
         hashCode = (hashCode * 397) ^ (Required?.GetCollectionHashCode() ?? 0);
         hashCode = (hashCode * 397) ^ (Examples?.GetCollectionHashCode() ?? 0);
         return(hashCode);
     }
 }
 /// <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 (MaxItems != null)
         {
             hashCode = hashCode * 59 + MaxItems.GetHashCode();
         }
         if (MaxPathDepth != null)
         {
             hashCode = hashCode * 59 + MaxPathDepth.GetHashCode();
         }
         if (Enabled != null)
         {
             hashCode = hashCode * 59 + Enabled.GetHashCode();
         }
         return(hashCode);
     }
 }