示例#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 (DataCustodianId != null)
         {
             hashCode = hashCode * 59 + DataCustodianId.GetHashCode();
         }
         if (DataCustodianApplicationStatus != null)
         {
             hashCode = hashCode * 59 + DataCustodianApplicationStatus.GetHashCode();
         }
         if (ThirdPartyApplicationDescription != null)
         {
             hashCode = hashCode * 59 + ThirdPartyApplicationDescription.GetHashCode();
         }
         if (ThirdPartyApplicationStatus != null)
         {
             hashCode = hashCode * 59 + ThirdPartyApplicationStatus.GetHashCode();
         }
         if (ThirdPartyApplicationType != null)
         {
             hashCode = hashCode * 59 + ThirdPartyApplicationType.GetHashCode();
         }
         if (ThirdPartyApplicationUse != null)
         {
             hashCode = hashCode * 59 + ThirdPartyApplicationUse.GetHashCode();
         }
         if (ThirdPartyPhone != null)
         {
             hashCode = hashCode * 59 + ThirdPartyPhone.GetHashCode();
         }
         if (AuthorizationServerUri != null)
         {
             hashCode = hashCode * 59 + AuthorizationServerUri.GetHashCode();
         }
         if (ThirdPartyNotifyUri != null)
         {
             hashCode = hashCode * 59 + ThirdPartyNotifyUri.GetHashCode();
         }
         if (AuthorizationServerAuthorizationEndpoint != null)
         {
             hashCode = hashCode * 59 + AuthorizationServerAuthorizationEndpoint.GetHashCode();
         }
         if (AuthorizationServerRegistrationEndpoint != null)
         {
             hashCode = hashCode * 59 + AuthorizationServerRegistrationEndpoint.GetHashCode();
         }
         if (AuthorizationServerTokenEndpoint != null)
         {
             hashCode = hashCode * 59 + AuthorizationServerTokenEndpoint.GetHashCode();
         }
         if (DataCustodianBulkRequestURI != null)
         {
             hashCode = hashCode * 59 + DataCustodianBulkRequestURI.GetHashCode();
         }
         if (DataCustodianResourceEndpoint != null)
         {
             hashCode = hashCode * 59 + DataCustodianResourceEndpoint.GetHashCode();
         }
         if (ThirdPartyScopeSelectionURI != null)
         {
             hashCode = hashCode * 59 + ThirdPartyScopeSelectionURI.GetHashCode();
         }
         if (ThirdPartyUserPortalScreenURI != null)
         {
             hashCode = hashCode * 59 + ThirdPartyUserPortalScreenURI.GetHashCode();
         }
         if (ClientSecret != null)
         {
             hashCode = hashCode * 59 + ClientSecret.GetHashCode();
         }
         if (LogoUri != null)
         {
             hashCode = hashCode * 59 + LogoUri.GetHashCode();
         }
         if (ClientName != null)
         {
             hashCode = hashCode * 59 + ClientName.GetHashCode();
         }
         if (ClientUri != null)
         {
             hashCode = hashCode * 59 + ClientUri.GetHashCode();
         }
         if (RedirectUri != null)
         {
             hashCode = hashCode * 59 + RedirectUri.GetHashCode();
         }
         if (ClientId != null)
         {
             hashCode = hashCode * 59 + ClientId.GetHashCode();
         }
         if (TosUri != null)
         {
             hashCode = hashCode * 59 + TosUri.GetHashCode();
         }
         if (PolicyUri != null)
         {
             hashCode = hashCode * 59 + PolicyUri.GetHashCode();
         }
         if (SoftwareId != null)
         {
             hashCode = hashCode * 59 + SoftwareId.GetHashCode();
         }
         if (SoftwareVersion != null)
         {
             hashCode = hashCode * 59 + SoftwareVersion.GetHashCode();
         }
         if (ClientIdIssuedAt != null)
         {
             hashCode = hashCode * 59 + ClientIdIssuedAt.GetHashCode();
         }
         if (ClientSecretExpiresAt != null)
         {
             hashCode = hashCode * 59 + ClientSecretExpiresAt.GetHashCode();
         }
         if (Contacts != null)
         {
             hashCode = hashCode * 59 + Contacts.GetHashCode();
         }
         if (TokenEndpointAuthMethod != null)
         {
             hashCode = hashCode * 59 + TokenEndpointAuthMethod.GetHashCode();
         }
         if (Scope != null)
         {
             hashCode = hashCode * 59 + Scope.GetHashCode();
         }
         if (GrantTypes != null)
         {
             hashCode = hashCode * 59 + GrantTypes.GetHashCode();
         }
         if (ResponseTypes != null)
         {
             hashCode = hashCode * 59 + ResponseTypes.GetHashCode();
         }
         if (RegistrationClientUri != null)
         {
             hashCode = hashCode * 59 + RegistrationClientUri.GetHashCode();
         }
         if (RegistrationAccessToken != null)
         {
             hashCode = hashCode * 59 + RegistrationAccessToken.GetHashCode();
         }
         if (DataCustodianScopeSelectionScreenURI != null)
         {
             hashCode = hashCode * 59 + DataCustodianScopeSelectionScreenURI.GetHashCode();
         }
         return(hashCode);
     }
 }
示例#2
0
        /// <summary>
        /// Returns true if ApplicationInformation instances are equal
        /// </summary>
        /// <param name="other">Instance of ApplicationInformation to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(ApplicationInformation other)
        {
            if (ReferenceEquals(null, other))
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return
                ((
                     DataCustodianId == other.DataCustodianId ||
                     DataCustodianId != null &&
                     DataCustodianId.Equals(other.DataCustodianId)
                     ) &&
                 (
                     DataCustodianApplicationStatus == other.DataCustodianApplicationStatus ||
                     DataCustodianApplicationStatus != null &&
                     DataCustodianApplicationStatus.Equals(other.DataCustodianApplicationStatus)
                 ) &&
                 (
                     ThirdPartyApplicationDescription == other.ThirdPartyApplicationDescription ||
                     ThirdPartyApplicationDescription != null &&
                     ThirdPartyApplicationDescription.Equals(other.ThirdPartyApplicationDescription)
                 ) &&
                 (
                     ThirdPartyApplicationStatus == other.ThirdPartyApplicationStatus ||
                     ThirdPartyApplicationStatus != null &&
                     ThirdPartyApplicationStatus.Equals(other.ThirdPartyApplicationStatus)
                 ) &&
                 (
                     ThirdPartyApplicationType == other.ThirdPartyApplicationType ||
                     ThirdPartyApplicationType != null &&
                     ThirdPartyApplicationType.Equals(other.ThirdPartyApplicationType)
                 ) &&
                 (
                     ThirdPartyApplicationUse == other.ThirdPartyApplicationUse ||
                     ThirdPartyApplicationUse != null &&
                     ThirdPartyApplicationUse.Equals(other.ThirdPartyApplicationUse)
                 ) &&
                 (
                     ThirdPartyPhone == other.ThirdPartyPhone ||
                     ThirdPartyPhone != null &&
                     ThirdPartyPhone.Equals(other.ThirdPartyPhone)
                 ) &&
                 (
                     AuthorizationServerUri == other.AuthorizationServerUri ||
                     AuthorizationServerUri != null &&
                     AuthorizationServerUri.Equals(other.AuthorizationServerUri)
                 ) &&
                 (
                     ThirdPartyNotifyUri == other.ThirdPartyNotifyUri ||
                     ThirdPartyNotifyUri != null &&
                     ThirdPartyNotifyUri.Equals(other.ThirdPartyNotifyUri)
                 ) &&
                 (
                     AuthorizationServerAuthorizationEndpoint == other.AuthorizationServerAuthorizationEndpoint ||
                     AuthorizationServerAuthorizationEndpoint != null &&
                     AuthorizationServerAuthorizationEndpoint.Equals(other.AuthorizationServerAuthorizationEndpoint)
                 ) &&
                 (
                     AuthorizationServerRegistrationEndpoint == other.AuthorizationServerRegistrationEndpoint ||
                     AuthorizationServerRegistrationEndpoint != null &&
                     AuthorizationServerRegistrationEndpoint.Equals(other.AuthorizationServerRegistrationEndpoint)
                 ) &&
                 (
                     AuthorizationServerTokenEndpoint == other.AuthorizationServerTokenEndpoint ||
                     AuthorizationServerTokenEndpoint != null &&
                     AuthorizationServerTokenEndpoint.Equals(other.AuthorizationServerTokenEndpoint)
                 ) &&
                 (
                     DataCustodianBulkRequestURI == other.DataCustodianBulkRequestURI ||
                     DataCustodianBulkRequestURI != null &&
                     DataCustodianBulkRequestURI.Equals(other.DataCustodianBulkRequestURI)
                 ) &&
                 (
                     DataCustodianResourceEndpoint == other.DataCustodianResourceEndpoint ||
                     DataCustodianResourceEndpoint != null &&
                     DataCustodianResourceEndpoint.Equals(other.DataCustodianResourceEndpoint)
                 ) &&
                 (
                     ThirdPartyScopeSelectionURI == other.ThirdPartyScopeSelectionURI ||
                     ThirdPartyScopeSelectionURI != null &&
                     ThirdPartyScopeSelectionURI.Equals(other.ThirdPartyScopeSelectionURI)
                 ) &&
                 (
                     ThirdPartyUserPortalScreenURI == other.ThirdPartyUserPortalScreenURI ||
                     ThirdPartyUserPortalScreenURI != null &&
                     ThirdPartyUserPortalScreenURI.Equals(other.ThirdPartyUserPortalScreenURI)
                 ) &&
                 (
                     ClientSecret == other.ClientSecret ||
                     ClientSecret != null &&
                     ClientSecret.Equals(other.ClientSecret)
                 ) &&
                 (
                     LogoUri == other.LogoUri ||
                     LogoUri != null &&
                     LogoUri.Equals(other.LogoUri)
                 ) &&
                 (
                     ClientName == other.ClientName ||
                     ClientName != null &&
                     ClientName.Equals(other.ClientName)
                 ) &&
                 (
                     ClientUri == other.ClientUri ||
                     ClientUri != null &&
                     ClientUri.Equals(other.ClientUri)
                 ) &&
                 (
                     RedirectUri == other.RedirectUri ||
                     RedirectUri != null &&
                     RedirectUri.SequenceEqual(other.RedirectUri)
                 ) &&
                 (
                     ClientId == other.ClientId ||
                     ClientId != null &&
                     ClientId.Equals(other.ClientId)
                 ) &&
                 (
                     TosUri == other.TosUri ||
                     TosUri != null &&
                     TosUri.Equals(other.TosUri)
                 ) &&
                 (
                     PolicyUri == other.PolicyUri ||
                     PolicyUri != null &&
                     PolicyUri.Equals(other.PolicyUri)
                 ) &&
                 (
                     SoftwareId == other.SoftwareId ||
                     SoftwareId != null &&
                     SoftwareId.Equals(other.SoftwareId)
                 ) &&
                 (
                     SoftwareVersion == other.SoftwareVersion ||
                     SoftwareVersion != null &&
                     SoftwareVersion.Equals(other.SoftwareVersion)
                 ) &&
                 (
                     ClientIdIssuedAt == other.ClientIdIssuedAt ||
                     ClientIdIssuedAt != null &&
                     ClientIdIssuedAt.Equals(other.ClientIdIssuedAt)
                 ) &&
                 (
                     ClientSecretExpiresAt == other.ClientSecretExpiresAt ||
                     ClientSecretExpiresAt != null &&
                     ClientSecretExpiresAt.Equals(other.ClientSecretExpiresAt)
                 ) &&
                 (
                     Contacts == other.Contacts ||
                     Contacts != null &&
                     Contacts.SequenceEqual(other.Contacts)
                 ) &&
                 (
                     TokenEndpointAuthMethod == other.TokenEndpointAuthMethod ||
                     TokenEndpointAuthMethod != null &&
                     TokenEndpointAuthMethod.Equals(other.TokenEndpointAuthMethod)
                 ) &&
                 (
                     Scope == other.Scope ||
                     Scope != null &&
                     Scope.SequenceEqual(other.Scope)
                 ) &&
                 (
                     GrantTypes == other.GrantTypes ||
                     GrantTypes != null &&
                     GrantTypes.SequenceEqual(other.GrantTypes)
                 ) &&
                 (
                     ResponseTypes == other.ResponseTypes ||
                     ResponseTypes != null &&
                     ResponseTypes.Equals(other.ResponseTypes)
                 ) &&
                 (
                     RegistrationClientUri == other.RegistrationClientUri ||
                     RegistrationClientUri != null &&
                     RegistrationClientUri.Equals(other.RegistrationClientUri)
                 ) &&
                 (
                     RegistrationAccessToken == other.RegistrationAccessToken ||
                     RegistrationAccessToken != null &&
                     RegistrationAccessToken.Equals(other.RegistrationAccessToken)
                 ) &&
                 (
                     DataCustodianScopeSelectionScreenURI == other.DataCustodianScopeSelectionScreenURI ||
                     DataCustodianScopeSelectionScreenURI != null &&
                     DataCustodianScopeSelectionScreenURI.Equals(other.DataCustodianScopeSelectionScreenURI)
                 ));
        }