public HeadlessEngineStateCommandCounter(EngineStateCommandQueue commands, EngineEventCatalog events, EngineSettings settings)
 {
     _commands            = commands;
     _events              = events;
     _settings            = settings;
     _consecutiveCommands = 0;
 }
Пример #2
0
        public Engine(IHandlers handlers, IEnvironmentCollection environments, ICommandParser parser, IOutput output, EngineEventCatalog eventCatalog, EngineSettings settings)
        {
            Assert.ArgumentNotNull(handlers, nameof(handlers));
            Assert.ArgumentNotNull(environments, nameof(environments));
            Assert.ArgumentNotNull(parser, nameof(parser));
            Assert.ArgumentNotNull(output, nameof(output));
            Assert.ArgumentNotNull(eventCatalog, nameof(eventCatalog));

            Environments  = environments;
            _handlers     = handlers;
            _eventCatalog = eventCatalog;
            _settings     = settings;
            _parser       = parser;
            Output        = output;
        }
Пример #3
0
        public EngineState(bool headless, EngineEventCatalog eventCatalog, EngineSettings settings)
        {
            Assert.ArgumentNotNull(eventCatalog, nameof(eventCatalog));
            Assert.ArgumentNotNull(settings, nameof(settings));

            Headless     = headless;
            EventCatalog = eventCatalog;
            ShouldExit   = false;

            Settings       = settings;
            Commands       = new EngineStateCommandQueue();
            Metadata       = new EngineStateMetadataCache();
            CommandCounter = Headless ?
                             new HeadlessEngineStateCommandCounter(Commands, eventCatalog, Settings) :
                             (IEngineStateCommandCounter) new InteractiveEngineStateCommandCounter(Commands, Settings);
        }