private void RegisterCommandConfigurations(ICommandConfigurationRegistry commandConfigurationRegistry) { foreach (var commandRegistration in _userDefinedCommandRegistrations) { commandRegistration.Load(commandConfigurationRegistry); } }
public CommandParser(ICommandConfigurationRegistry commandConfigurationRegistry, ICommandFactory commandFactory, ICommandArgumentParser commandArgumentParser) { _commandConfigurationRegistry = commandConfigurationRegistry; _commandFactory = commandFactory; _commandArgumentParser = commandArgumentParser; }
internal ConsoleApplicationBootstrapper(IDependancyContainerFactory dependancyContainerFactory, ICommandConfigurationRegistry commandConfigurationRegistry, IConsoleApplicationFactory consoleApplicationFactory, DependancyConfiguration defaultDependancyConfiguration, CommandRegistration defaultCommandRegistration, ApplicationConfiguration applicationConfiguration) { _dependancyContainerFactory = dependancyContainerFactory; _commandConfigurationRegistry = commandConfigurationRegistry; _consoleApplicationFactory = consoleApplicationFactory; _userDefinedDependancyConfigurations.Add(defaultDependancyConfiguration); _userDefinedCommandRegistrations.Add(defaultCommandRegistration); _applicationConfiguration = applicationConfiguration; }
public IConsoleApplication Create(ICommandConfigurationRegistry commandConfigurationRegistry, IDependancyContainer dependancyContainer, ApplicationConfiguration applicationConfiguration) { var commandParser = new CommandParser(commandConfigurationRegistry, new CommandFactory(dependancyContainer), new CommandArgumentParser( applicationConfiguration.ValueBinderProviderCollection)); var resultHandler = new ResultHandler(new ConsoleOutput()); var consoleInput = new ConsoleInput(); var exceptionHandler = new ExceptionHandler(applicationConfiguration.ExceptionHandlerConfigurationsCollection); return new ConsoleApplication(commandParser, resultHandler, consoleInput, exceptionHandler); }
public void Load(ICommandConfigurationRegistry commandConfigurationRegistry) { var configurations = Load(); commandConfigurationRegistry.AddMultiple(configurations); }