示例#1
0
        public PackageBill(IEnumerable<Subscription> subscriptions, Money total)
        {
            Check.Argument.ArrayLenghtIsNotZero(subscriptions, nameof(subscriptions));
            Check.Argument.IsNotNull(total, nameof(total));

            this.subscriptions = subscriptions;

            costings = new BillCostings(subscriptions.Sum(), total);
        }
示例#2
0
        public CallCharge(TelephoneNumber called, TimeSpan duration, Money cost)
        {
            Check.Argument.IsNotNull(called, nameof(called));
            Check.Argument.IsNotNull(cost, nameof(cost));

            this.called = called;
            this.duration = duration;
            this.cost = cost;
        }
示例#3
0
文件: Money.cs 项目: jasatwal/skybill
        public Money Subtract(Money money)
        {
            Check.Argument.IsNotNull(money, nameof(money));

            return new Money(Value - money.Value);
        }
示例#4
0
文件: Money.cs 项目: jasatwal/skybill
        public Money Add(Money money)
        {
            Check.Argument.IsNotNull(money, nameof(money));

            return new Money(Value + money.Value);
        }