private bool ParseArguments(IInteractiveWindow window, string arguments, out string commandName, out IInteractiveWindowCommand command) { string name = arguments.Split(whitespaceChars)[0]; if (name.Length == 0) { command = null; commandName = null; return(true); } var commands = window.GetInteractiveCommands(); string prefix = commands.CommandPrefix; // display help on a particular command: command = commands[name]; if (command == null && name.StartsWith(prefix)) { name = name.Substring(prefix.Length); command = commands[name]; } commandName = name; return(command != null); }
private bool ParseArguments(IInteractiveWindow window, string arguments, out string commandName, out IInteractiveWindowCommand command) { string name = arguments.Split(s_whitespaceChars)[0]; if (name.Length == 0) { command = null; commandName = null; return true; } var commands = window.GetInteractiveCommands(); string prefix = commands.CommandPrefix; // display help on a particular command: command = commands[name]; if (command == null && name.StartsWith(prefix, StringComparison.Ordinal)) { name = name.Substring(prefix.Length); command = commands[name]; } commandName = name; return command != null; }