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

            return
                ((
                     EventTopics == other.EventTopics ||
                     EventTopics != null &&
                     EventTopics.Equals(other.EventTopics)
                     ) &&
                 (
                     EventFilter == other.EventFilter ||
                     EventFilter != null &&
                     EventFilter.Equals(other.EventFilter)
                 ) &&
                 (
                     TranslateListenerType == other.TranslateListenerType ||
                     TranslateListenerType != null &&
                     TranslateListenerType.Equals(other.TranslateListenerType)
                 ) &&
                 (
                     TranslatePropertyList == other.TranslatePropertyList ||
                     TranslatePropertyList != null &&
                     TranslatePropertyList.Equals(other.TranslatePropertyList)
                 ) &&
                 (
                     PoolSize == other.PoolSize ||
                     PoolSize != null &&
                     PoolSize.Equals(other.PoolSize)
                 ) &&
                 (
                     MaxPoolSize == other.MaxPoolSize ||
                     MaxPoolSize != null &&
                     MaxPoolSize.Equals(other.MaxPoolSize)
                 ) &&
                 (
                     QueueSize == other.QueueSize ||
                     QueueSize != null &&
                     QueueSize.Equals(other.QueueSize)
                 ) &&
                 (
                     KeepAliveTime == other.KeepAliveTime ||
                     KeepAliveTime != null &&
                     KeepAliveTime.Equals(other.KeepAliveTime)
                 ));
        }
コード例 #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 (EventTopics != null)
         {
             hashCode = hashCode * 59 + EventTopics.GetHashCode();
         }
         if (EventFilter != null)
         {
             hashCode = hashCode * 59 + EventFilter.GetHashCode();
         }
         if (TranslateListenerType != null)
         {
             hashCode = hashCode * 59 + TranslateListenerType.GetHashCode();
         }
         if (TranslatePropertyList != null)
         {
             hashCode = hashCode * 59 + TranslatePropertyList.GetHashCode();
         }
         if (PoolSize != null)
         {
             hashCode = hashCode * 59 + PoolSize.GetHashCode();
         }
         if (MaxPoolSize != null)
         {
             hashCode = hashCode * 59 + MaxPoolSize.GetHashCode();
         }
         if (QueueSize != null)
         {
             hashCode = hashCode * 59 + QueueSize.GetHashCode();
         }
         if (KeepAliveTime != null)
         {
             hashCode = hashCode * 59 + KeepAliveTime.GetHashCode();
         }
         return(hashCode);
     }
 }