コード例 #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
ファイル: AccountRoundingService.cs プロジェクト: ifzz/FDK
        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);
        }