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

            return
                ((
                     CdnConfigDistributionDomain == other.CdnConfigDistributionDomain ||
                     CdnConfigDistributionDomain != null &&
                     CdnConfigDistributionDomain.Equals(other.CdnConfigDistributionDomain)
                     ) &&
                 (
                     CdnConfigEnableRewriting == other.CdnConfigEnableRewriting ||
                     CdnConfigEnableRewriting != null &&
                     CdnConfigEnableRewriting.Equals(other.CdnConfigEnableRewriting)
                 ) &&
                 (
                     CdnConfigPathPrefixes == other.CdnConfigPathPrefixes ||
                     CdnConfigPathPrefixes != null &&
                     CdnConfigPathPrefixes.Equals(other.CdnConfigPathPrefixes)
                 ) &&
                 (
                     CdnConfigCdnttl == other.CdnConfigCdnttl ||
                     CdnConfigCdnttl != null &&
                     CdnConfigCdnttl.Equals(other.CdnConfigCdnttl)
                 ) &&
                 (
                     CdnConfigApplicationProtocol == other.CdnConfigApplicationProtocol ||
                     CdnConfigApplicationProtocol != null &&
                     CdnConfigApplicationProtocol.Equals(other.CdnConfigApplicationProtocol)
                 ));
        }