public void InvokeCommand(CmdlineCommand command, string args) { // We don't want to block this call because it causes issues if some sync operation that shuts down server is also called. // For example, mode switch or instance shutdown calls are stopping server, // which results in serviceHost.Close() timeout, since server would be still waiting for InvokeCommand to finish. Task.Run(async() => { await Task.Delay(100); syncContext.Post(_ => CommandExecuted?.Invoke(this, new CommandExecutedEventArgs(command, args)), null); }); }
public void InvokeCommand(CmdlineCommand command, string args) { Channel.InvokeCommand(command, args); }
public void InvokeCommand(CmdlineCommand command, string args) { CommandExecuted?.Invoke(this, new CommandExecutedEventArgs(command, args)); }
public CommandExecutedEventArgs(CmdlineCommand command, string args) { Command = command; Args = args; }