static void runService(object processId) { AbstractService svc = null; try { svc = new VistaService(); // TODO refactor further to detect additional extractor service types at runtime svc.Name = Convert.ToString(processId); svc.execute(); } catch (Exception) { } finally { if (((VistaService)svc).Report != null) { bool createLocalRpt = false; Boolean.TryParse(ConfigurationManager.AppSettings["CreateLocalTextReport"], out createLocalRpt); if (createLocalRpt) { try { new FileDao().saveToFile(((VistaService)svc).Report.ToString(), "C:\\Downstream\\ExtractorReport.txt"); } catch (Exception exc) { //System.Console.WriteLine(exc.ToString()); } } } } }
static void extractWithStopIen(ExtractorConfiguration config, String startIen, String stopIen) { VistaQuery query = new VistaQuery(config, config.QueryConfigurations.RootNode.Value); query.StartIen = query.From = startIen; query.SiteCode = config.SiteCode; VistaService svc = new VistaService(); svc.LastIen = stopIen; svc.testExecute(new domain.reporting.ExtractorReport("TestID"), query, config, new FileDao(false)); }