public override int GetHashCode()
        {
            int hashCode = 1685690023;

            if (Context != null)
            {
                hashCode += Context.GetHashCode();
            }

            if (AccessToken != null)
            {
                hashCode += AccessToken.GetHashCode();
            }

            if (TokenType != null)
            {
                hashCode += TokenType.GetHashCode();
            }

            if (ExpiresAt != null)
            {
                hashCode += ExpiresAt.GetHashCode();
            }

            if (MerchantId != null)
            {
                hashCode += MerchantId.GetHashCode();
            }

            if (SubscriptionId != null)
            {
                hashCode += SubscriptionId.GetHashCode();
            }

            if (PlanId != null)
            {
                hashCode += PlanId.GetHashCode();
            }

            if (IdToken != null)
            {
                hashCode += IdToken.GetHashCode();
            }

            if (RefreshToken != null)
            {
                hashCode += RefreshToken.GetHashCode();
            }

            if (ShortLived != null)
            {
                hashCode += ShortLived.GetHashCode();
            }

            return(hashCode);
        }
Beispiel #2
0
        /// <summary>
        ///     Gets the hash code
        /// </summary>
        /// <returns>Hash code</returns>
        public override int GetHashCode()
        {
            unchecked // Overflow is fine, just wrap
            {
                int hashCode = 41;
                // Suitable nullity checks etc, of course :)
                if (IsCanceled != null)
                {
                    hashCode = hashCode * 59 + IsCanceled.GetHashCode();
                }

                if (IsError != null)
                {
                    hashCode = hashCode * 59 + IsError.GetHashCode();
                }

                if (ErrorCode != null)
                {
                    hashCode = hashCode * 59 + ErrorCode.GetHashCode();
                }

                if (AccessToken != null)
                {
                    hashCode = hashCode * 59 + AccessToken.GetHashCode();
                }

                if (IdToken != null)
                {
                    hashCode = hashCode * 59 + IdToken.GetHashCode();
                }

                if (Scopes != null)
                {
                    hashCode = hashCode * 59 + Scopes.GetHashCode();
                }

                if (ExpiresOn != null)
                {
                    hashCode = hashCode * 59 + ExpiresOn.GetHashCode();
                }

                return(hashCode);
            }
        }
Beispiel #3
0
 /// <summary>
 /// Return the HashCode of this object.
 /// </summary>
 /// <returns>The HashCode of this object.</returns>
 public override Int32 GetHashCode()
 => IdToken.GetHashCode();