Exemplo n.º 1
0
 public override int GetHashCode()
 {
     unchecked
     {
         return((Denomination.GetHashCode() * 397) ^ IntegralAmount.GetHashCode());
     }
 }
Exemplo n.º 2
0
        public string ToString(string format, IFormatProvider formatProvider)
        {
            string representation = string.Format(_formatPattern,
                                                  Quantity.ToString(CultureInfo.InvariantCulture),
                                                  Denomination.ToString(format, formatProvider));

            return(Stringifier.Default.StringifyIt(representation));
        }
Exemplo n.º 3
0
 internal QuantifiedDenomination(Denomination denomination, uint quantity = 0u)
 {
     Denomination = denomination;
     Quantity     = quantity;
 }
Exemplo n.º 4
0
 public bool Equals(IntegralDenomination other)
 {
     return(Denomination.Equals(other.Denomination) &&
            IntegralAmount == other.IntegralAmount);
 }
Exemplo n.º 5
0
        internal static long CalculateAmount(Denomination denomination, Currency operationCurrency)
        {
            long integralAmount = Convert.ToInt64(Money.CalculateMinorAmount(denomination.Value, operationCurrency));

            return(integralAmount);
        }
Exemplo n.º 6
0
 public IntegralDenomination(Denomination denomination, Currency operationCurrency)
 {
     Denomination   = denomination;
     IntegralAmount = CalculateAmount(denomination, operationCurrency);
 }