static void Main(string[] args) { CommandController.Register(new ReplCommand()); CommandController.Register(new LoadCommand()); CommandController.Register(new DumpStringsCommand()); CommandController.Register(new AggregateRoots()); var dump = new Dump(); foreach (var cmd in SplitArgs(args)) { CommandController.Execute(dump, cmd); } }
/// <summary> /// Executes the command against the specified dump. /// </summary> /// <param name="dump">The dump to execute the command against.</param> public void Execute(Dump dump) { while (true) { Console.Write("> "); var args = CmdSplit(Console.ReadLine()).ToList(); if (args.Count == 0) { continue; } if (string.Equals(args[0], "quit", StringComparison.OrdinalIgnoreCase)) { break; } CommandController.Execute(dump, args); } }