Exemplo n.º 1
0
 static void OnStart(string[] args)
 {
     try
     {
         _consumerHost = new ConsumerHost();
         _consumerHost.Start(args);
         Logger.Info("Host Started!");
     }
     catch (Exception ex)
     {
         Logger.Error("OnStart Error!", ex);
     }
 }
Exemplo n.º 2
0
 protected override void OnStart(string[] args)
 {
     try
     {
         _consumerHost = new ConsumerHost();
         _consumerHost.Start(args);
         Logger.Info("Host Started!");
     }
     catch (Exception ex)
     {
         //https://msdn.microsoft.com/en-us/library/windows/desktop/ms681383.aspx
         ExitCode = 1064; // ERROR_EXCEPTION_IN_SERVICE
         Logger.Error("OnStart Error!", ex);
         throw;
     }
 }