private static void StartStopService(LoggingState logState, CommandAsyncProcessor service) { if (service.Disposed) { return; } if (logState.EnableAutoSaveLog) { service.Start( ); } else { service.Stop( ); } }
public void Break(BreakType type) { if (type == BreakType.Shutdown) { if (ServiceLocator.IsRegistered <CommandAsyncProcessor> ( )) { CommandAsyncProcessor processor = ServiceLocator.Retrieve <CommandAsyncProcessor> ( ); if (processor != null) { processor.Stop( ); processor.Dispose( ); } } } }