internal override void Visit(CommandNode node) { if (this._allowedCommands != null && node.Expression == null && node.Elements[0] is Token element) { foreach (string allowedCommand in this._allowedCommands) { if (allowedCommand.Equals(element.TokenText, StringComparison.OrdinalIgnoreCase)) { return; } } throw InterpreterError.NewInterpreterException((object)element, typeof(RuntimeException), element, "CmdletNotInAllowedListForDataSection", (object)element.TokenText); } }
internal override void Visit(CommandNode node) => this.preOrderNodes.Add((ParseTreeNode)node);