public void Run() { int n = int.Parse(Console.ReadLine()); for (int i = 0; i < n; i++) { string[] inputArgs = Console.ReadLine().Split(); this.commandInterpreter.AddAppender(inputArgs); } string input = string.Empty; while ((input = Console.ReadLine()) != "END") { string[] inputArgs = input.Split('|'); this.commandInterpreter.AddMessage(inputArgs); } commandInterpreter.PrintInfo(); }
public void Run() { var n = int.Parse(Console.ReadLine()); for (int i = 0; i < n; i++) { var inputArgs = Console.ReadLine().Split().ToArray(); commandInterpreter.AddAppender(inputArgs); } var input = Console.ReadLine(); while (input != "END") { var inputArgs = input.Split('|').ToArray(); commandInterpreter.AddMessage(inputArgs); input = Console.ReadLine(); } commandInterpreter.PrintInfo(); }
public void Run() { int appendersCount = int.Parse(Console.ReadLine()); for (int i = 0; i < appendersCount; i++) { var appenderArgs = Console.ReadLine().Split(); this.commandInterpreter.AddAppender(appenderArgs); } var command = Console.ReadLine(); while (command != "END") { var reportArgs = command.Split("|"); commandInterpreter.AddReport(reportArgs); command = Console.ReadLine(); } commandInterpreter.PrintInfo(); }