Esempio n. 1
0
 public Task <PackageInfo> GetPackageInfo(List <Guid> productIds)
 {
     return(Task.FromResult(new PackageInfo()
     {
         Weight = WeightCalculator.CalculateWeight(productIds.Count),
         Volume = VolumeEstimator.Calculate(productIds.Count)
     }));
 }
Esempio n. 2
0
        public Task <PackageInfo> GetPackageInfo(IEnumerable <int> productIds)
        {
            var count = productIds.Count();

            return(Task.FromResult(new PackageInfo()
            {
                Weight = WeightCalculator.CalculateWeight(count),
                Volume = VolumeEstimator.Calculate(count)
            }));
        }