Пример #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);
            }
        }
Пример #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);
        }