Esempio n. 1
0
        public AccountRoundingService(IRounding rounder, IPrecisionProvider precisionProvider, string currency)
        {
            if (rounder == null)
            {
                throw new ArgumentNullException(nameof(rounder));
            }

            if (precisionProvider == null)
            {
                throw new ArgumentNullException(nameof(precisionProvider));
            }

            if (currency == null)
            {
                throw new ArgumentNullException(nameof(currency));
            }


            this.rounder           = rounder;
            this.precisionProvider = precisionProvider;

            if (currency.Length > 0)
            {
                this.precision = precisionProvider.GetCurrencyPrecision(currency);
            }
        }
Esempio n. 2
0
        public AccountRoundingService(IRounding rounder, IPrecisionProvider precisionProvider, string currency)
        {
            if (rounder == null)
                throw new ArgumentNullException(nameof(rounder));

            if (precisionProvider == null)
                throw new ArgumentNullException(nameof(precisionProvider));

            if (currency == null)
                throw new ArgumentNullException(nameof(currency));


            this.rounder = rounder;
            this.precisionProvider = precisionProvider;

            if (currency.Length > 0)
                this.precision = precisionProvider.GetCurrencyPrecision(currency);
        }