static void Main(string[] args) { var configuration = BuildConfigurationRoot(args); var bus = CreateBus(configuration); var busHandle = bus.Start(); var service = new SimulateVehicleDataService(bus, new RoutePlanner()); StopOnCancelKeyPress(service); try { service.Start(); _terminateApplication.WaitOne(); service.Stop(); } finally { service.Dispose(); busHandle.Dispose(); } }