Example #1
0
        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);
            }
        }
Example #2
0
        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);
                }
            }
        }