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; }
public static Currency Get(string isoCode) => CurrencyTypeRepository.Get(isoCode.ToUpper());