public CommandRunnerModel( ICommandsCollectionModel commandsCollection, ICommandParser commandParser ) { this.commandsCollection = commandsCollection; this.commandParser = commandParser; }
public static IConsoleHintModel Create( IConsoleInputHistoryModel history, ICommandsCollectionModel commandsCollection, IConsoleSettings settings ) { return(new ConsoleHintModel( commandsCollection, history, settings )); }
public static ConsoleModel Create( IConsoleInputHistoryModel historyModel, ICommandsCollectionModel commandsCollection ) { return(new ConsoleModel( commandsCollection, new CommandRunnerModel( commandsCollection, new CommandParserModel(new TypeParserModel()) ), new ConsoleOutputModel(), historyModel )); }
public static void Initialize() { if (model != null) { return; } IConsoleSettings settings = ConsoleSettings.Instance; IConsoleInputHistoryModel historyModel = ConsoleInputHistoryModelFactory.Create(settings); ICommandsCollectionModel commandsCollection = CommandsCollectionFactory.Create(settings); model = ConsoleModelFactory.Create(historyModel, commandsCollection); IConsoleHintModel hintModel = ConsoleHintModelFactory.Create( historyModel, commandsCollection, settings ); ConsoleUIView view = ConsoleUIViewFactory.Create(settings); IConsoleInputDetectorModel inputDetector = ConsoleInputDetectorModelFactory.Create( view, model, settings ); ConsoleUIControllerFactory.Create(model, view, inputDetector, hintModel); ConsoleHintUIControllerFactory.Create( hintModel, view.HintUI, view, inputDetector, settings ); Task.Run(commandsCollection.Initialize); inputDetector.Initialize(); }