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

            return
                ((
                     CoinType == other.CoinType ||
                     CoinType != null &&
                     CoinType.Equals(other.CoinType)
                     ) &&
                 (
                     WalletName == other.WalletName ||
                     WalletName != null &&
                     WalletName.Equals(other.WalletName)
                 ) &&
                 (
                     Name == other.Name ||
                     Name != null &&
                     Name.Equals(other.Name)
                 ) &&
                 (
                     Symbol == other.Symbol ||
                     Symbol != null &&
                     Symbol.Equals(other.Symbol)
                 ) &&
                 (
                     WalletSymbol == other.WalletSymbol ||
                     WalletSymbol != null &&
                     WalletSymbol.Equals(other.WalletSymbol)
                 ) &&
                 (
                     WalletType == other.WalletType ||
                     WalletType != null &&
                     WalletType.Equals(other.WalletType)
                 ) &&
                 (
                     TransactionFee == other.TransactionFee ||
                     TransactionFee != null &&
                     TransactionFee.Equals(other.TransactionFee)
                 ) &&
                 (
                     Precision == other.Precision ||
                     Precision != null &&
                     Precision.Equals(other.Precision)
                 ) &&
                 (
                     BackingCoinType == other.BackingCoinType ||
                     BackingCoinType != null &&
                     BackingCoinType.Equals(other.BackingCoinType)
                 ) &&
                 (
                     SupportsOutputMemos == other.SupportsOutputMemos ||
                     SupportsOutputMemos != null &&
                     SupportsOutputMemos.Equals(other.SupportsOutputMemos)
                 ) &&
                 (
                     Restricted == other.Restricted ||
                     Restricted != null &&
                     Restricted.Equals(other.Restricted)
                 ) &&
                 (
                     Authorized == other.Authorized ||
                     Authorized != null &&
                     Authorized.Equals(other.Authorized)
                 ) &&
                 (
                     NotAuthorizedReasons == other.NotAuthorizedReasons ||
                     NotAuthorizedReasons != null &&
                     NotAuthorizedReasons.SequenceEqual(other.NotAuthorizedReasons)
                 ));
        }