static void Main()
 {
     using (ProgramService service = new ProgramService())
     {
         if (Environment.UserInteractive)
         {
             service.OnStart(null);
             Console.WriteLine("Bus created and configured");
             Console.WriteLine("Press any key to exit");
             Console.ReadKey();
             service.OnStop();
             return;
         }
         Run(service);
     }
 }
 static void Main()
 {
     using (ProgramService service = new ProgramService())
     {
         if (Environment.UserInteractive)
         {
             service.OnStart(null);
             Console.WriteLine("Bus created and configured");
             Console.WriteLine("Press any key to exit");
             Console.ReadKey();
             service.OnStop();
             return;
         }
         Run(service);
     }
 }