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

            return
                ((
                     OptoutCookies == other.OptoutCookies ||
                     OptoutCookies != null &&
                     OptoutCookies.Equals(other.OptoutCookies)
                     ) &&
                 (
                     OptoutHeaders == other.OptoutHeaders ||
                     OptoutHeaders != null &&
                     OptoutHeaders.Equals(other.OptoutHeaders)
                 ) &&
                 (
                     OptoutWhitelistCookies == other.OptoutWhitelistCookies ||
                     OptoutWhitelistCookies != null &&
                     OptoutWhitelistCookies.Equals(other.OptoutWhitelistCookies)
                 ));
        }
Beispiel #2
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 (OptoutCookies != null)
         {
             hashCode = hashCode * 59 + OptoutCookies.GetHashCode();
         }
         if (OptoutHeaders != null)
         {
             hashCode = hashCode * 59 + OptoutHeaders.GetHashCode();
         }
         if (OptoutWhitelistCookies != null)
         {
             hashCode = hashCode * 59 + OptoutWhitelistCookies.GetHashCode();
         }
         return(hashCode);
     }
 }