Ejemplo n.º 1
0
        private static void StartStopService(LoggingState logState, CommandAsyncProcessor service)
        {
            if (service.Disposed)
            {
                return;
            }

            if (logState.EnableAutoSaveLog)
            {
                service.Start( );
            }
            else
            {
                service.Stop( );
            }
        }
Ejemplo n.º 2
0
        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( );
                    }
                }
            }
        }