Esempio n. 1
0
 static void Main(string[] args)
 {
     if (Environment.UserInteractive)
     {
         var queueProcessor = new QueueProcessor();
         queueProcessor.RunAsConsole(args);
     }
     else
     {
         if (args.Length == 0)
         {
             var servicesToRun = new ServiceBase[]
             {
                 new QueueProcessor(),
                 new NotificationProcessor()
             };
             ServiceBase.Run(servicesToRun);
         }
         else
         {
             NotificationStarter.Start();
             Starter.Start();
         }
     }
 }
Esempio n. 2
0
 static void Main(string[] args)
 {
     if (args.Length == 0)
     {
         var servicesToRun = new ServiceBase[]
         {
             new QueueProcessor(),
             new NotificationProcessor()
         };
         ServiceBase.Run(servicesToRun);
     }
     else
     {
         NotificationStarter.Start();
         Starter.Start();
     }
 }
 protected override void OnStart(string[] args)
 {
     NotificationStarter.Start();
 }