コード例 #1
0
 protected override void OnStop()
 {
     try { MessageBusController.Stop(); }
     catch (Exception ex)
     {
         _logger.Info("Failed to stop StarChef.Listener service due to unexpected error", ex);
         throw;
     }
     finally
     {
         _logger.Info("Stopped");
     }
 }
コード例 #2
0
        protected override void OnStart(string[] args)
        {
            // Set the application ID that is reported on every log message
            GlobalContext.Properties["ApplicationId"] = "StarChef.Listener";
            ConfigObjectMapping.Init();

            _logger.Info("Started");

            try
            {
                MessageBusController.Start();
            }
            catch(Exception ex)
            {
                _logger.Info("Failed to start StarChef.Listener service due to unexpected error", ex);
                throw;
            }
        }