Ejemplo n.º 1
0
 public string AveragePerDay()
 {
     if (TotalDays == DaysRemaining)
     {
         return(TotalSpent.ToString("C"));
     }
     return((TotalSpent / (TotalDays - DaysRemaining)).ToString("C"));
 }
Ejemplo n.º 2
0
 public override int GetHashCode()
 {
     unchecked
     {
         var hashCode = TotalSpent.GetHashCode();
         hashCode = (hashCode * 397) ^ TotalReceived.GetHashCode();
         hashCode = (hashCode * 397) ^ Balance.GetHashCode();
         hashCode = (hashCode * 397) ^ Txi;
         hashCode = (hashCode * 397) ^ Txo;
         hashCode = (hashCode * 397) ^ TxsCount;
         hashCode = (hashCode * 397) ^ (Legacy != null ? Legacy.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (Addresses != null ? Addresses.GetHashCode() : 0);
         return(hashCode);
     }
 }
Ejemplo n.º 3
0
 public bool Equals(GetBtcAddressPayload other)
 {
     if (ReferenceEquals(null, other))
     {
         return(false);
     }
     if (ReferenceEquals(this, other))
     {
         return(true);
     }
     return(TotalSpent.Equals(other.TotalSpent) && TotalReceived.Equals(other.TotalReceived) &&
            Balance.Equals(other.Balance) && Txi == other.Txi && Txo == other.Txo &&
            TxsCount == other.TxsCount && string.Equals(Legacy, other.Legacy) &&
            Addresses.SequenceEqual(other.Addresses));
 }
Ejemplo n.º 4
0
        public override int GetHashCode()
        {
            unchecked
            {
                var hashCode = AvatarUrl != null?AvatarUrl.GetHashCode() : 0;

                hashCode = (hashCode * 397) ^ (Billing != null ? Billing.GetHashCode() : 0);
                hashCode = (hashCode * 397) ^ (Email != null ? Email.GetHashCode() : 0);
                hashCode = (hashCode * 397) ^ (FirstName != null ? FirstName.GetHashCode() : 0);
                hashCode = (hashCode * 397) ^ Id;
                hashCode = (hashCode * 397) ^ IsPayingCustomer.GetHashCode();
                hashCode = (hashCode * 397) ^ (LastName != null ? LastName.GetHashCode() : 0);
                hashCode = (hashCode * 397) ^ OrdersCount;
                hashCode = (hashCode * 397) ^ (Password != null ? Password.GetHashCode() : 0);
                hashCode = (hashCode * 397) ^ (Role != null ? Role.GetHashCode() : 0);
                hashCode = (hashCode * 397) ^ (Shipping != null ? Shipping.GetHashCode() : 0);
                hashCode = (hashCode * 397) ^ (TotalSpent != null ? TotalSpent.GetHashCode() : 0);
                hashCode = (hashCode * 397) ^ (Username != null ? Username.GetHashCode() : 0);
                return(hashCode);
            }
        }