internal bool RunCommands(string inputCommands) { inputCommands = inputCommands.Replace("\r\n", "\n"); char[] delimiter = new char[] { '\n' }; string[] commands = inputCommands.Split(delimiter, StringSplitOptions.RemoveEmptyEntries); if (null == commands || (commands.Length == 0)) { return(false); } foreach (string command in commands) { if (null == command) { continue; } string trimmed = command.Trim(); if (string.IsNullOrEmpty(trimmed)) { continue; } GraphCommand graphCommand = GraphCommand.FromString(trimmed); if (!RerouteToHandler(graphCommand)) { return(false); } } return(true); }