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

            return
                ((
                     TranslationFactory == other.TranslationFactory ||
                     TranslationFactory != null &&
                     TranslationFactory.Equals(other.TranslationFactory)
                     ) &&
                 (
                     DefaultConnectorLabel == other.DefaultConnectorLabel ||
                     DefaultConnectorLabel != null &&
                     DefaultConnectorLabel.Equals(other.DefaultConnectorLabel)
                 ) &&
                 (
                     DefaultConnectorAttribution == other.DefaultConnectorAttribution ||
                     DefaultConnectorAttribution != null &&
                     DefaultConnectorAttribution.Equals(other.DefaultConnectorAttribution)
                 ) &&
                 (
                     DefaultConnectorWorkspaceId == other.DefaultConnectorWorkspaceId ||
                     DefaultConnectorWorkspaceId != null &&
                     DefaultConnectorWorkspaceId.Equals(other.DefaultConnectorWorkspaceId)
                 ) &&
                 (
                     DefaultConnectorSubscriptionKey == other.DefaultConnectorSubscriptionKey ||
                     DefaultConnectorSubscriptionKey != null &&
                     DefaultConnectorSubscriptionKey.Equals(other.DefaultConnectorSubscriptionKey)
                 ) &&
                 (
                     LanguageMapLocation == other.LanguageMapLocation ||
                     LanguageMapLocation != null &&
                     LanguageMapLocation.Equals(other.LanguageMapLocation)
                 ) &&
                 (
                     CategoryMapLocation == other.CategoryMapLocation ||
                     CategoryMapLocation != null &&
                     CategoryMapLocation.Equals(other.CategoryMapLocation)
                 ) &&
                 (
                     RetryAttempts == other.RetryAttempts ||
                     RetryAttempts != null &&
                     RetryAttempts.Equals(other.RetryAttempts)
                 ) &&
                 (
                     TimeoutCount == other.TimeoutCount ||
                     TimeoutCount != null &&
                     TimeoutCount.Equals(other.TimeoutCount)
                 ));
        }
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 (TranslationFactory != null)
         {
             hashCode = hashCode * 59 + TranslationFactory.GetHashCode();
         }
         if (DefaultConnectorLabel != null)
         {
             hashCode = hashCode * 59 + DefaultConnectorLabel.GetHashCode();
         }
         if (DefaultConnectorAttribution != null)
         {
             hashCode = hashCode * 59 + DefaultConnectorAttribution.GetHashCode();
         }
         if (DefaultConnectorWorkspaceId != null)
         {
             hashCode = hashCode * 59 + DefaultConnectorWorkspaceId.GetHashCode();
         }
         if (DefaultConnectorSubscriptionKey != null)
         {
             hashCode = hashCode * 59 + DefaultConnectorSubscriptionKey.GetHashCode();
         }
         if (LanguageMapLocation != null)
         {
             hashCode = hashCode * 59 + LanguageMapLocation.GetHashCode();
         }
         if (CategoryMapLocation != null)
         {
             hashCode = hashCode * 59 + CategoryMapLocation.GetHashCode();
         }
         if (RetryAttempts != null)
         {
             hashCode = hashCode * 59 + RetryAttempts.GetHashCode();
         }
         if (TimeoutCount != null)
         {
             hashCode = hashCode * 59 + TimeoutCount.GetHashCode();
         }
         return(hashCode);
     }
 }