public PageXmlExport_5(
     IPageFileWriter fileWriter,
     IExportDataProvider_5 dataProvider,
     ILocationService locationService)
 {
     this.fileWriter      = fileWriter;
     this.dataProvider    = dataProvider;
     this.locationService = locationService;
 }
Example #2
0
        private readonly bool addCustomerDetails; // used in 2/5 methods

        public PageXmlExport_4(
            IPageFileWriter fileWriter,
            int maxSalesOrders,
            bool addCustomerDetails,
            IExportDataProvider_4 dataProvider)
        {
            this.fileWriter         = fileWriter;
            this.dataProvider       = dataProvider;
            this.maxSalesOrders     = maxSalesOrders;
            this.addCustomerDetails = addCustomerDetails;
        }
        private readonly ILocationService locationService; // used in 3/5 methods

        public PageXmlExport_3(
            IPageFileWriter fileWriter,
            int maxSalesOrders,
            bool addCustomerDetails,
            ICrmService crmService,
            ILocationService locationService)
        {
            this.fileWriter         = fileWriter;
            this.maxSalesOrders     = maxSalesOrders;
            this.addCustomerDetails = addCustomerDetails;
            this.crmService         = crmService;
            this.locationService    = locationService;
        }
        public void ExportDataForCustomers(IEnumerable <string> customers)
        {
            ICrmService      crmService      = ServiceLocator.Current.GetInstance <ICrmService>();
            ILocationService locationService = ServiceLocator.Current.GetInstance <ILocationService>();
            IPageFileWriter  pageWriter      = ServiceLocator.Current.GetInstance <IPageFileWriter>();

            var exporter = new PageXmlExport_3(pageWriter, 10, true, crmService, locationService);

            foreach (var customer in customers)
            {
                PageData userInput = GetUserInput(customer);
                exporter.ExportCustomerPageWithExternalData(customer, userInput);
            }
        }
 public static bool WriteFile(this IPageFileWriter writer, PageXml page)
 {
     return(writer.WriteFile(page, string.Empty));
 }