public HelpCommand(ICommandRegistry registry, SystemCommandRegistry systemRegistry, IOutputWriter outputWriter, GeneralSettings settings) { _registry = registry; _systemRegistry = systemRegistry; _outputWriter = outputWriter; _settings = settings; }
public CleeEngine(ICommandRegistry commandRegistry, ICommandFactory commandFactory, IArgumentMapper argumentMapper, ICommandExecutor commandExecutor) { _registry = commandRegistry; _commandFactory = commandFactory; _mapper = argumentMapper; _commandExecutor = commandExecutor; _systemRegistry = SystemCommandRegistry.CreateAndInitialize(); // this should be removed from the constructor! _systemCommandFactory = new SystemCommandFactory(); _systemCommandFactory.RegisterInstance<ICommandRegistry>(_registry); _systemCommandFactory.RegisterInstance<ICommandFactory>(_commandFactory); _systemCommandFactory.RegisterInstance<IArgumentMapper>(_mapper); _systemCommandFactory.RegisterInstance<ICommandExecutor>(_commandExecutor); _systemCommandFactory.RegisterInstance<SystemCommandRegistry>(_systemRegistry); _systemCommandFactory.RegisterFactoryMethod<IOutputWriter>(() => _outputWriter); _systemCommandFactory.RegisterInstance(_settings); _history = new LinkedList<HistoryEntry>(); _outputWriter = new DefaultOutputWriter(); }
public ListCommand(ICommandRegistry registry, SystemCommandRegistry systemRegistry) { _registry = registry; _systemRegistry = systemRegistry; }