public static void Main(string[] args) { Log.Output = Log.Mode.Console; Eager.Initalize(); _instance = new Zazzles.Debugger.Debugger(); _instance.AddCommand("module", new ModuleCommand()); _instance.AddCommand("dump", new DumpCommand()); if (args.Length > 0) { _instance.ProcessCommand(args); return; } Log.PaddedHeader("FOG Console"); Log.Entry(Name, "Type ? for a list of commands"); Log.NewLine(); try { InteractiveShell(); } catch (Exception ex) { Log.Error(Name, ex); Console.ReadLine(); } }
public static void Main(string[] args) { Log.Output = Log.Mode.Console; Eager.Initalize(); _instance = new Zazzles.Debugger.Debugger(); _instance.AddCommand("module", new ModuleCommand()); _instance.AddCommand("dump", new DumpCommand()); _instance.AddCommand("power", new PowerCommand()); if (args.Length > 0) { _instance.ProcessCommand(args); return; } Log.PaddedHeader("FOG Console"); Log.Entry(Name, "Type ? for a list of commands"); Log.NewLine(); try { InteractiveShell(); } catch (Exception ex) { Log.Error(Name, ex); Console.ReadLine(); } }
private static void InteractiveShell() { while (true) { Log.Write("fog: "); var input = Console.ReadLine(); if (string.IsNullOrEmpty(input)) { continue; } if (_instance.ProcessCommand(input.Split(' '))) { break; } Log.Divider(); } Bus.Dispose(); }