コード例 #1
0
 public void UpdateBy(PricingPolicy policy)
 {
     MinimumCharge            = policy.MinimumCharge;
     MaximumCharge            = policy.MaximumCharge;
     FixedCharge              = policy.FixedCharge;
     AdditionalPrice          = policy.AdditionalPrice;
     MaxItemCountInFixedPrice = policy.MaxItemCountInFixedPrice;
 }
コード例 #2
0
        public void SetPricingPolicy(PricingPolicy policy)
        {
            CheckRule(new PricingPolicyMustBeValidRule(policy));

            if (PricingPolicy == null)
            {
                PricingPolicy = policy;
            }
            else
            {
                PricingPolicy.UpdateBy(policy);
            }
        }