Exemplo n.º 1
0
        internal Currency(string isoCode)
        {
            if (!CurrencyTypeRepository.Exists(isoCode))
            {
                throw new ArgumentException($"ISO Currency Code ({isoCode}) is not registered. Invoke the CurrencyTypeRepository.Register() to register.");
            }

            var newCurrency = CurrencyTypeRepository.Get(isoCode);

            IsoCode      = newCurrency.IsoCode;
            IsDigital    = newCurrency.IsDigital;
            GeneralName  = newCurrency.GeneralName;
            Symbol       = newCurrency.Symbol;
            DecimalPlace = newCurrency.DecimalPlace;
            //BaseDecimalPlace = newCurrency.BaseDecimalPlace;
            DecimalMark  = newCurrency.DecimalMark;
            ThousandMark = newCurrency.ThousandMark;
        }
Exemplo n.º 2
0
 public static Currency Get(string isoCode) => CurrencyTypeRepository.Get(isoCode.ToUpper());