コード例 #1
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 (OauthConfigId != null)
         {
             hashCode = hashCode * 59 + OauthConfigId.GetHashCode();
         }
         if (OauthClientId != null)
         {
             hashCode = hashCode * 59 + OauthClientId.GetHashCode();
         }
         if (OauthClientSecret != null)
         {
             hashCode = hashCode * 59 + OauthClientSecret.GetHashCode();
         }
         if (OauthScope != null)
         {
             hashCode = hashCode * 59 + OauthScope.GetHashCode();
         }
         if (OauthConfigProviderId != null)
         {
             hashCode = hashCode * 59 + OauthConfigProviderId.GetHashCode();
         }
         if (OauthCreateUsers != null)
         {
             hashCode = hashCode * 59 + OauthCreateUsers.GetHashCode();
         }
         if (OauthUseridProperty != null)
         {
             hashCode = hashCode * 59 + OauthUseridProperty.GetHashCode();
         }
         if (ForceStrictUsernameMatching != null)
         {
             hashCode = hashCode * 59 + ForceStrictUsernameMatching.GetHashCode();
         }
         if (OauthEncodeUserids != null)
         {
             hashCode = hashCode * 59 + OauthEncodeUserids.GetHashCode();
         }
         if (OauthHashUserids != null)
         {
             hashCode = hashCode * 59 + OauthHashUserids.GetHashCode();
         }
         if (OauthCallBackUrl != null)
         {
             hashCode = hashCode * 59 + OauthCallBackUrl.GetHashCode();
         }
         if (OauthAccessTokenPersist != null)
         {
             hashCode = hashCode * 59 + OauthAccessTokenPersist.GetHashCode();
         }
         if (OauthAccessTokenPersistCookie != null)
         {
             hashCode = hashCode * 59 + OauthAccessTokenPersistCookie.GetHashCode();
         }
         if (OauthCsrfStateProtection != null)
         {
             hashCode = hashCode * 59 + OauthCsrfStateProtection.GetHashCode();
         }
         if (OauthRedirectRequestParams != null)
         {
             hashCode = hashCode * 59 + OauthRedirectRequestParams.GetHashCode();
         }
         if (OauthConfigSiblingsAllow != null)
         {
             hashCode = hashCode * 59 + OauthConfigSiblingsAllow.GetHashCode();
         }
         return(hashCode);
     }
 }
コード例 #2
0
        /// <summary>
        /// Returns true if ComAdobeGraniteAuthOauthProviderProperties instances are equal
        /// </summary>
        /// <param name="other">Instance of ComAdobeGraniteAuthOauthProviderProperties to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(ComAdobeGraniteAuthOauthProviderProperties other)
        {
            if (other is null)
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return
                ((
                     OauthConfigId == other.OauthConfigId ||
                     OauthConfigId != null &&
                     OauthConfigId.Equals(other.OauthConfigId)
                     ) &&
                 (
                     OauthClientId == other.OauthClientId ||
                     OauthClientId != null &&
                     OauthClientId.Equals(other.OauthClientId)
                 ) &&
                 (
                     OauthClientSecret == other.OauthClientSecret ||
                     OauthClientSecret != null &&
                     OauthClientSecret.Equals(other.OauthClientSecret)
                 ) &&
                 (
                     OauthScope == other.OauthScope ||
                     OauthScope != null &&
                     OauthScope.Equals(other.OauthScope)
                 ) &&
                 (
                     OauthConfigProviderId == other.OauthConfigProviderId ||
                     OauthConfigProviderId != null &&
                     OauthConfigProviderId.Equals(other.OauthConfigProviderId)
                 ) &&
                 (
                     OauthCreateUsers == other.OauthCreateUsers ||
                     OauthCreateUsers != null &&
                     OauthCreateUsers.Equals(other.OauthCreateUsers)
                 ) &&
                 (
                     OauthUseridProperty == other.OauthUseridProperty ||
                     OauthUseridProperty != null &&
                     OauthUseridProperty.Equals(other.OauthUseridProperty)
                 ) &&
                 (
                     ForceStrictUsernameMatching == other.ForceStrictUsernameMatching ||
                     ForceStrictUsernameMatching != null &&
                     ForceStrictUsernameMatching.Equals(other.ForceStrictUsernameMatching)
                 ) &&
                 (
                     OauthEncodeUserids == other.OauthEncodeUserids ||
                     OauthEncodeUserids != null &&
                     OauthEncodeUserids.Equals(other.OauthEncodeUserids)
                 ) &&
                 (
                     OauthHashUserids == other.OauthHashUserids ||
                     OauthHashUserids != null &&
                     OauthHashUserids.Equals(other.OauthHashUserids)
                 ) &&
                 (
                     OauthCallBackUrl == other.OauthCallBackUrl ||
                     OauthCallBackUrl != null &&
                     OauthCallBackUrl.Equals(other.OauthCallBackUrl)
                 ) &&
                 (
                     OauthAccessTokenPersist == other.OauthAccessTokenPersist ||
                     OauthAccessTokenPersist != null &&
                     OauthAccessTokenPersist.Equals(other.OauthAccessTokenPersist)
                 ) &&
                 (
                     OauthAccessTokenPersistCookie == other.OauthAccessTokenPersistCookie ||
                     OauthAccessTokenPersistCookie != null &&
                     OauthAccessTokenPersistCookie.Equals(other.OauthAccessTokenPersistCookie)
                 ) &&
                 (
                     OauthCsrfStateProtection == other.OauthCsrfStateProtection ||
                     OauthCsrfStateProtection != null &&
                     OauthCsrfStateProtection.Equals(other.OauthCsrfStateProtection)
                 ) &&
                 (
                     OauthRedirectRequestParams == other.OauthRedirectRequestParams ||
                     OauthRedirectRequestParams != null &&
                     OauthRedirectRequestParams.Equals(other.OauthRedirectRequestParams)
                 ) &&
                 (
                     OauthConfigSiblingsAllow == other.OauthConfigSiblingsAllow ||
                     OauthConfigSiblingsAllow != null &&
                     OauthConfigSiblingsAllow.Equals(other.OauthConfigSiblingsAllow)
                 ));
        }