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

            return
                ((
                     QueryLimitInMemory == other.QueryLimitInMemory ||
                     QueryLimitInMemory != null &&
                     QueryLimitInMemory.Equals(other.QueryLimitInMemory)
                     ) &&
                 (
                     QueryLimitReads == other.QueryLimitReads ||
                     QueryLimitReads != null &&
                     QueryLimitReads.Equals(other.QueryLimitReads)
                 ) &&
                 (
                     QueryFailTraversal == other.QueryFailTraversal ||
                     QueryFailTraversal != null &&
                     QueryFailTraversal.Equals(other.QueryFailTraversal)
                 ) &&
                 (
                     FastQuerySize == other.FastQuerySize ||
                     FastQuerySize != null &&
                     FastQuerySize.Equals(other.FastQuerySize)
                 ));
        }