Esempio n. 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 (OauthProviderId != null)
         {
             hashCode = hashCode * 59 + OauthProviderId.GetHashCode();
         }
         if (OauthProviderGithubAuthorizationUrl != null)
         {
             hashCode = hashCode * 59 + OauthProviderGithubAuthorizationUrl.GetHashCode();
         }
         if (OauthProviderGithubTokenUrl != null)
         {
             hashCode = hashCode * 59 + OauthProviderGithubTokenUrl.GetHashCode();
         }
         if (OauthProviderGithubProfileUrl != null)
         {
             hashCode = hashCode * 59 + OauthProviderGithubProfileUrl.GetHashCode();
         }
         return(hashCode);
     }
 }
Esempio n. 2
0
        /// <summary>
        /// Returns true if ComAdobeGraniteAuthOauthImplGithubProviderImplProperties instances are equal
        /// </summary>
        /// <param name="other">Instance of ComAdobeGraniteAuthOauthImplGithubProviderImplProperties to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(ComAdobeGraniteAuthOauthImplGithubProviderImplProperties other)
        {
            if (other is null)
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return
                ((
                     OauthProviderId == other.OauthProviderId ||
                     OauthProviderId != null &&
                     OauthProviderId.Equals(other.OauthProviderId)
                     ) &&
                 (
                     OauthProviderGithubAuthorizationUrl == other.OauthProviderGithubAuthorizationUrl ||
                     OauthProviderGithubAuthorizationUrl != null &&
                     OauthProviderGithubAuthorizationUrl.Equals(other.OauthProviderGithubAuthorizationUrl)
                 ) &&
                 (
                     OauthProviderGithubTokenUrl == other.OauthProviderGithubTokenUrl ||
                     OauthProviderGithubTokenUrl != null &&
                     OauthProviderGithubTokenUrl.Equals(other.OauthProviderGithubTokenUrl)
                 ) &&
                 (
                     OauthProviderGithubProfileUrl == other.OauthProviderGithubProfileUrl ||
                     OauthProviderGithubProfileUrl != null &&
                     OauthProviderGithubProfileUrl.Equals(other.OauthProviderGithubProfileUrl)
                 ));
        }