Start() public method

public Start ( ) : void
return void
Beispiel #1
0
        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();
            }
        }
Beispiel #2
0
        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();
            }
        }