private HostUtilities.DebuggerCommand DoProcessCommand(PSHost host, string command, InvocationInfo invocationInfo) { if (((command.Length == 0) && (this.lastCommand != null)) && this.lastCommand.RepeatOnEnter) { if (this.lastCommand == this.listCommand) { if (this.lastLineDisplayed < this.lines.Length) { this.DisplayScript(host, invocationInfo, this.lastLineDisplayed + 1, 0x10); } return(this.listCommand); } command = this.lastCommand.Command; } Match match = new Regex(@"^l(ist)?(\s+(?<start>\S+))?(\s+(?<count>\S+))?$", RegexOptions.IgnoreCase).Match(command); if (match.Success) { this.DisplayScript(host, invocationInfo, match); return(this.listCommand); } HostUtilities.DebuggerCommand command2 = null; if (!this.commandTable.TryGetValue(command, out command2)) { return(new HostUtilities.DebuggerCommand(command, null, false, false)); } if (command2 == this.helpCommand) { this.DisplayHelp(host); } return(command2); }
public HostUtilities.DebuggerCommand ProcessCommand( PSHost host, string command, InvocationInfo invocationInfo) { return(this.lastCommand = this.DoProcessCommand(host, command, invocationInfo)); }
public DebuggerCommandProcessor() { this.commandTable = new Dictionary <string, HostUtilities.DebuggerCommand>((IEqualityComparer <string>)StringComparer.OrdinalIgnoreCase); this.commandTable["stepInto"] = this.commandTable["s"] = new HostUtilities.DebuggerCommand("stepInto", new DebuggerResumeAction?(DebuggerResumeAction.StepInto), true, false); this.commandTable["stepOut"] = this.commandTable["o"] = new HostUtilities.DebuggerCommand("stepOut", new DebuggerResumeAction?(DebuggerResumeAction.StepOut), false, false); this.commandTable["stepOver"] = this.commandTable["v"] = new HostUtilities.DebuggerCommand("stepOver", new DebuggerResumeAction?(DebuggerResumeAction.StepOver), true, false); this.commandTable["continue"] = this.commandTable["c"] = new HostUtilities.DebuggerCommand("continue", new DebuggerResumeAction?(DebuggerResumeAction.Continue), false, false); this.commandTable["quit"] = this.commandTable["q"] = new HostUtilities.DebuggerCommand("quit", new DebuggerResumeAction?(DebuggerResumeAction.Stop), false, false); this.commandTable["k"] = new HostUtilities.DebuggerCommand("get-pscallstack", new DebuggerResumeAction?(), false, false); Dictionary <string, HostUtilities.DebuggerCommand> commandTable1 = this.commandTable; Dictionary <string, HostUtilities.DebuggerCommand> commandTable2 = this.commandTable; DebuggerResumeAction?action1 = new DebuggerResumeAction?(); HostUtilities.DebuggerCommand debuggerCommand1; HostUtilities.DebuggerCommand debuggerCommand2 = debuggerCommand1 = this.helpCommand = new HostUtilities.DebuggerCommand("h", action1, false, true); commandTable2["?"] = debuggerCommand1; HostUtilities.DebuggerCommand debuggerCommand3 = debuggerCommand2; commandTable1["h"] = debuggerCommand3; Dictionary <string, HostUtilities.DebuggerCommand> commandTable3 = this.commandTable; Dictionary <string, HostUtilities.DebuggerCommand> commandTable4 = this.commandTable; DebuggerResumeAction?action2 = new DebuggerResumeAction?(); HostUtilities.DebuggerCommand debuggerCommand4; HostUtilities.DebuggerCommand debuggerCommand5 = debuggerCommand4 = this.listCommand = new HostUtilities.DebuggerCommand("list", action2, true, true); commandTable4["l"] = debuggerCommand4; HostUtilities.DebuggerCommand debuggerCommand6 = debuggerCommand5; commandTable3["list"] = debuggerCommand6; this.commandTable[string.Empty] = new HostUtilities.DebuggerCommand(string.Empty, new DebuggerResumeAction?(), false, true); }
public DebuggerCommandProcessor() { this.commandTable["stepInto"] = this.commandTable["s"] = new HostUtilities.DebuggerCommand("stepInto", (DebuggerResumeAction)1, true, false); this.commandTable["stepOut"] = this.commandTable["o"] = new HostUtilities.DebuggerCommand("stepOut", (DebuggerResumeAction)2, false, false); this.commandTable["stepOver"] = this.commandTable["v"] = new HostUtilities.DebuggerCommand("stepOver", (DebuggerResumeAction)3, true, false); this.commandTable["continue"] = this.commandTable["c"] = new HostUtilities.DebuggerCommand("continue", (DebuggerResumeAction)0, false, false); this.commandTable["quit"] = this.commandTable["q"] = new HostUtilities.DebuggerCommand("quit", (DebuggerResumeAction)4, false, false); this.commandTable["k"] = new HostUtilities.DebuggerCommand("get-pscallstack", null, false, false); this.commandTable["h"] = this.commandTable["?"] = this.helpCommand = new HostUtilities.DebuggerCommand("h", null, false, true); this.commandTable["list"] = this.commandTable["l"] = this.listCommand = new HostUtilities.DebuggerCommand("list", null, true, true); this.commandTable[string.Empty] = new HostUtilities.DebuggerCommand(string.Empty, null, false, true); }
public HostUtilities.DebuggerCommand ProcessCommand(PSHost host, string command, InvocationInfo invocationInfo) { return (this.lastCommand = this.DoProcessCommand(host, command, invocationInfo)); }
public DebuggerCommandProcessor() { this.commandTable["stepInto"] = this.commandTable["s"] = new HostUtilities.DebuggerCommand("stepInto", (DebuggerResumeAction)1, true, false); this.commandTable["stepOut"] = this.commandTable["o"] = new HostUtilities.DebuggerCommand("stepOut", (DebuggerResumeAction)2, false, false); this.commandTable["stepOver"] = this.commandTable["v"] = new HostUtilities.DebuggerCommand("stepOver", (DebuggerResumeAction)3, true, false); this.commandTable["continue"] = this.commandTable["c"] = new HostUtilities.DebuggerCommand("continue", (DebuggerResumeAction)0, false, false); this.commandTable["quit"] = this.commandTable["q"] = new HostUtilities.DebuggerCommand("quit", (DebuggerResumeAction)4, false, false); this.commandTable["k"] = new HostUtilities.DebuggerCommand("get-pscallstack", null, false, false); this.commandTable["h"] = this.commandTable["?"] = this.helpCommand = new HostUtilities.DebuggerCommand("h", null, false, true); this.commandTable["list"] = this.commandTable["l"] = this.listCommand = new HostUtilities.DebuggerCommand("list", null, true, true); this.commandTable[string.Empty] = new HostUtilities.DebuggerCommand(string.Empty, null, false, true); }