private object BuildSummaryAndChart(Product product)
 =>
 ProductWithData
 .Create(product)
 .Map(GetEstimate)
 .Match(
     estimate => PopulateDtoWithEstimate(product, estimate),
     error => PopulateDtoWithoutEstimate(product, error.ToString())
     );
Пример #2
0
 private static Option <ProductWithData> Convert(this Product product) => ProductWithData.Create(product);
 private static Either <Error, ProductWithData> ValidProduct(this Product product) => ProductWithData.Create(product);