コード例 #1
0
        public override bool Equals(object obj)
        {
            if (obj == null)
            {
                return(false);
            }

            if (obj == this)
            {
                return(true);
            }

            return(obj is CreateLoyaltyAccountRequest other &&
                   ((LoyaltyAccount == null && other.LoyaltyAccount == null) || (LoyaltyAccount?.Equals(other.LoyaltyAccount) == true)) &&
                   ((IdempotencyKey == null && other.IdempotencyKey == null) || (IdempotencyKey?.Equals(other.IdempotencyKey) == true)));
        }
コード例 #2
0
        public override int GetHashCode()
        {
            int hashCode = -436956469;

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

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

            return(hashCode);
        }
コード例 #3
0
 protected void ToString(List <string> toStringOutput)
 {
     toStringOutput.Add($"LoyaltyAccount = {(LoyaltyAccount == null ? "null" : LoyaltyAccount.ToString())}");
     toStringOutput.Add($"IdempotencyKey = {(IdempotencyKey == null ? "null" : IdempotencyKey == string.Empty ? "" : IdempotencyKey)}");
 }