示例#1
0
        static void Main(string[] args)
        {
            var orderReportFormattingSettings =
                new OrderReportFormattingSettings(args.Length > 0 && args[0].Equals("noNumberOfLines"));

            var cities = DatabaseModuleFunctions.LoadAllDataWithoutOrders();

            var generateReportForOrder =
                ReportingModule.GenerateReportForOrder()
                .PartiallyInvoke(orderReportFormattingSettings);

            var generateReportForCustomer =
                ReportingModule.GenerateReportForCustomer()
                .PartiallyInvoke(
                    generateReportForOrder,
                    DatabaseModule.LoadOrdersForCustomer());

            var generateReportForCity =
                ReportingModule.GenerateReportForCity()
                .PartiallyInvoke(generateReportForCustomer);

            var generateReport =
                ReportingModule.GenerateReport()
                .PartiallyInvoke(generateReportForCity);

            var report = generateReport(cities);

            SaveReport(report);
        }
示例#2
0
 public System.Collections.Immutable.ImmutableArray <City> Invoke(Unit input)
 {
     return(DatabaseModuleFunctions.LoadAllDataWithoutOrders());
 }