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

            return
                ((
                     PatternTime == other.PatternTime ||
                     PatternTime != null &&
                     PatternTime.Equals(other.PatternTime)
                     ) &&
                 (
                     PatternNewline == other.PatternNewline ||
                     PatternNewline != null &&
                     PatternNewline.Equals(other.PatternNewline)
                 ) &&
                 (
                     PatternDayOfMonth == other.PatternDayOfMonth ||
                     PatternDayOfMonth != null &&
                     PatternDayOfMonth.Equals(other.PatternDayOfMonth)
                 ) &&
                 (
                     PatternMonth == other.PatternMonth ||
                     PatternMonth != null &&
                     PatternMonth.Equals(other.PatternMonth)
                 ) &&
                 (
                     PatternYear == other.PatternYear ||
                     PatternYear != null &&
                     PatternYear.Equals(other.PatternYear)
                 ) &&
                 (
                     PatternDate == other.PatternDate ||
                     PatternDate != null &&
                     PatternDate.Equals(other.PatternDate)
                 ) &&
                 (
                     PatternDateTime == other.PatternDateTime ||
                     PatternDateTime != null &&
                     PatternDateTime.Equals(other.PatternDateTime)
                 ) &&
                 (
                     PatternEmail == other.PatternEmail ||
                     PatternEmail != null &&
                     PatternEmail.Equals(other.PatternEmail)
                 ));
        }
コード例 #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 (PatternTime != null)
         {
             hashCode = hashCode * 59 + PatternTime.GetHashCode();
         }
         if (PatternNewline != null)
         {
             hashCode = hashCode * 59 + PatternNewline.GetHashCode();
         }
         if (PatternDayOfMonth != null)
         {
             hashCode = hashCode * 59 + PatternDayOfMonth.GetHashCode();
         }
         if (PatternMonth != null)
         {
             hashCode = hashCode * 59 + PatternMonth.GetHashCode();
         }
         if (PatternYear != null)
         {
             hashCode = hashCode * 59 + PatternYear.GetHashCode();
         }
         if (PatternDate != null)
         {
             hashCode = hashCode * 59 + PatternDate.GetHashCode();
         }
         if (PatternDateTime != null)
         {
             hashCode = hashCode * 59 + PatternDateTime.GetHashCode();
         }
         if (PatternEmail != null)
         {
             hashCode = hashCode * 59 + PatternEmail.GetHashCode();
         }
         return(hashCode);
     }
 }