public static async Task SendCommand(string input) { ShellEventArgs args = new ShellEventArgs(input); if (ShellEvent != null) { await ShellEvent.Invoke(args); } if (!args.Handled) { await Command.ExeCommand(input); } }
async Task MainAsync() //! Main loop { foreach (string str in args) //? Execute launch commands { await Command.ExeCommand(str); } while (true) //? Main async loop { string input = Shell.Input(); ShellEventArgs args = new ShellEventArgs(input); if (ShellEvent != null) { await ShellEvent.Invoke(args); } if (!args.Handled) { await Command.ExeCommand(input); } } }