/// <summary> /// Executes the specified command line. /// </summary> /// <param name="commandString">The command line.</param> public void Execute(string commandString) { CommandLine commandLine = new CommandLine(commandString); IDangrCommandFactory commandFactory = this.GetCommandFactory(commandLine.CommandName); IDangrCommand command = commandFactory.Create(commandLine); command.Execute(this); }
/// <summary> /// Gets the help text for the specified <see cref="IDangrCommand" />s defined in the <see cref="ICommandContext" />. /// </summary> /// <param name="commandName">Name of the command.</param> /// <returns> /// The help text for the specified <see cref="IDangrCommand" />s defined in the <see cref="ICommandContext" />. /// </returns> string ICommandContext.GetHelpText(string commandName) { IDangrCommandFactory commandFactory = this.GetCommandFactory(commandName); return(commandFactory.CommandHelp); }