コード例 #1
0
ファイル: SnippingCostCalculator.cs プロジェクト: eqr/Color
        private WeightInKg GetTotalWeight(IEnumerable <Consignment> consignments)
        {
            var totalWeight = new WeightInKg(0m);

            // Calculate the weight of the items
            foreach (Consignment consignment in consignments)
            {
                totalWeight = totalWeight.Add(consignment.ConsignmentWeight());
            }
            // Add a box weight
            totalWeight = totalWeight.Add(_boxWeightInKg);
            return(totalWeight);
        }
コード例 #2
0
 internal bool IsWithinBand(WeightInKg weight)
 {
     throw new NotImplementedException();
 }
コード例 #3
0
ファイル: SnippingCostCalculator.cs プロジェクト: eqr/Color
 public ShippingCostCalculator(IEnumerable <WeightBand> weightBand, WeightInKg boxWeightInKg)
 {
     _weightBand = weightBand; _boxWeightInKg = boxWeightInKg;
 }