void start() { BatchProcessor batch = new BatchProcessor(); batch.add(new CallDataLoader()); batch.add(new TwitterDataLoader()); batch.add(new SensorDataLoader()); batch.execute(); Console.ReadKey(); }
void Start() { BatchProcessor processor = new BatchProcessor(); SensorDataLoader sensorDataLoader = new SensorDataLoader(); TwitterDataLoader twitterDataLoader = new TwitterDataLoader(); CallDataLoader callDataLoader = new CallDataLoader(); processor.AddLoader(sensorDataLoader); //Ik zou de loaders ook direct hier kunnen instantieren, maar nu zou ik er later nog naar kunnen refereren processor.AddLoader(twitterDataLoader); processor.AddLoader(callDataLoader); Console.WriteLine(); processor.ProcessAll(); }
static void Main(string[] args) { CallDataLoader callDataLoader = new CallDataLoader(); SensorDataLoader sensorDataLoader = new SensorDataLoader(); TwitterDataLoader twitterDataLoader = new TwitterDataLoader(); BatchProcessor batchProcessor = new BatchProcessor(); batchProcessor.AddLoader(callDataLoader); batchProcessor.AddLoader(sensorDataLoader); batchProcessor.AddLoader(twitterDataLoader); batchProcessor.ProcessLoaders(); Console.ReadKey(); }