public BindResult Bind(CommandLineContext context) { EnsureInitialized(); App.SetContext(context); var processor = new CommandLineProcessor(App, context.Arguments); var command = processor.Process(); var validationResult = command.GetValidationResult(); command.Invoke(); _bindResult.Command = command; _bindResult.ValidationResult = validationResult; _bindResult.ParentTarget = _target; return(_bindResult); }
public BindResult Bind(IConsole console, string[] args) { EnsureInitialized(); App.SetConsole(console); var processor = new CommandLineProcessor(App, args); var command = processor.Process(); var validationResult = command.GetValidationResult(); command.Invoke(); _bindResult.Command = command; _bindResult.ValidationResult = validationResult; _bindResult.ParentTarget = _target; return(_bindResult); }