示例#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 (CacheEnable != null)
         {
             hashCode = hashCode * 59 + CacheEnable.GetHashCode();
         }
         if (CacheRootPaths != null)
         {
             hashCode = hashCode * 59 + CacheRootPaths.GetHashCode();
         }
         if (CacheMaxSize != null)
         {
             hashCode = hashCode * 59 + CacheMaxSize.GetHashCode();
         }
         if (CacheMaxEntries != null)
         {
             hashCode = hashCode * 59 + CacheMaxEntries.GetHashCode();
         }
         return(hashCode);
     }
 }
示例#2
0
        /// <summary>
        /// Returns true if ComAdobeCqDamS7imagingImplPsPlatformServerServletProperties instances are equal
        /// </summary>
        /// <param name="other">Instance of ComAdobeCqDamS7imagingImplPsPlatformServerServletProperties to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(ComAdobeCqDamS7imagingImplPsPlatformServerServletProperties other)
        {
            if (other is null)
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return
                ((
                     CacheEnable == other.CacheEnable ||
                     CacheEnable != null &&
                     CacheEnable.Equals(other.CacheEnable)
                     ) &&
                 (
                     CacheRootPaths == other.CacheRootPaths ||
                     CacheRootPaths != null &&
                     CacheRootPaths.Equals(other.CacheRootPaths)
                 ) &&
                 (
                     CacheMaxSize == other.CacheMaxSize ||
                     CacheMaxSize != null &&
                     CacheMaxSize.Equals(other.CacheMaxSize)
                 ) &&
                 (
                     CacheMaxEntries == other.CacheMaxEntries ||
                     CacheMaxEntries != null &&
                     CacheMaxEntries.Equals(other.CacheMaxEntries)
                 ));
        }