public Main() { InitializeComponent(); _simulator = new SweetsMachinesSimulator(10); _simulator.MachineEvents += _simulator_MachineEvents; var eventHubConnectionString = ConfigurationManager.AppSettings["EventHubConnectionString"]; _eventHubSender = new SweetsMachineDataSender(eventHubConnectionString); _localFileStore = new LocalFileStore(baseDir); }
public Main() { InitializeComponent(); _simulator = new SweetsMachinesSimulator(10); _simulator.MachineEvents += _simulator_MachineEvents; var eventHubConnectionString = ConfigurationManager.AppSettings["EventHubConnectionString"]; _eventHubSender = new SweetsMachineDataSender(eventHubConnectionString); var currentDir = Directory.GetCurrentDirectory(); baseDir = Path.Combine(Directory.GetCurrentDirectory(), "Data"); if (!Directory.Exists(baseDir)) { Directory.CreateDirectory(baseDir); } _localFileStore = new LocalFileStore(baseDir); }