public bool Stop(HostControl hostControl) { try { Log.Info("Action Handler Service is stopping."); _messageTransportHost.Stop(); } catch (Exception e) { Log.Error(e); } finally { // Remove Log Listener Log4NetStandardLogListener.Clear(); LogManager.Manager.ClearListeners(); } return(true); }
private void Stop() { var task = Task.Factory.StartNew(() => _messageTransportHost.Stop()); task.Wait(); }