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

            return
                ((
                     TranslateLanguage == other.TranslateLanguage ||
                     TranslateLanguage != null &&
                     TranslateLanguage.Equals(other.TranslateLanguage)
                     ) &&
                 (
                     TranslateDisplay == other.TranslateDisplay ||
                     TranslateDisplay != null &&
                     TranslateDisplay.Equals(other.TranslateDisplay)
                 ) &&
                 (
                     TranslateAttribution == other.TranslateAttribution ||
                     TranslateAttribution != null &&
                     TranslateAttribution.Equals(other.TranslateAttribution)
                 ) &&
                 (
                     TranslateCaching == other.TranslateCaching ||
                     TranslateCaching != null &&
                     TranslateCaching.Equals(other.TranslateCaching)
                 ) &&
                 (
                     TranslateSmartRendering == other.TranslateSmartRendering ||
                     TranslateSmartRendering != null &&
                     TranslateSmartRendering.Equals(other.TranslateSmartRendering)
                 ) &&
                 (
                     TranslateCachingDuration == other.TranslateCachingDuration ||
                     TranslateCachingDuration != null &&
                     TranslateCachingDuration.Equals(other.TranslateCachingDuration)
                 ) &&
                 (
                     TranslateSessionSaveInterval == other.TranslateSessionSaveInterval ||
                     TranslateSessionSaveInterval != null &&
                     TranslateSessionSaveInterval.Equals(other.TranslateSessionSaveInterval)
                 ) &&
                 (
                     TranslateSessionSaveBatchLimit == other.TranslateSessionSaveBatchLimit ||
                     TranslateSessionSaveBatchLimit != null &&
                     TranslateSessionSaveBatchLimit.Equals(other.TranslateSessionSaveBatchLimit)
                 ));
        }
Example #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 (TranslateLanguage != null)
         {
             hashCode = hashCode * 59 + TranslateLanguage.GetHashCode();
         }
         if (TranslateDisplay != null)
         {
             hashCode = hashCode * 59 + TranslateDisplay.GetHashCode();
         }
         if (TranslateAttribution != null)
         {
             hashCode = hashCode * 59 + TranslateAttribution.GetHashCode();
         }
         if (TranslateCaching != null)
         {
             hashCode = hashCode * 59 + TranslateCaching.GetHashCode();
         }
         if (TranslateSmartRendering != null)
         {
             hashCode = hashCode * 59 + TranslateSmartRendering.GetHashCode();
         }
         if (TranslateCachingDuration != null)
         {
             hashCode = hashCode * 59 + TranslateCachingDuration.GetHashCode();
         }
         if (TranslateSessionSaveInterval != null)
         {
             hashCode = hashCode * 59 + TranslateSessionSaveInterval.GetHashCode();
         }
         if (TranslateSessionSaveBatchLimit != null)
         {
             hashCode = hashCode * 59 + TranslateSessionSaveBatchLimit.GetHashCode();
         }
         return(hashCode);
     }
 }