public static void HandleProcessStateInfo(ProcessStateInfo processStateInfo, IPCSession session) { switch (processStateInfo.State) { // TODO: Implement on childs. Called in ConsoleManager.Stop for now. case ProcessState.Stopped: ConsoleManager.RemoveConsoleClient(processStateInfo.Alias); break; default: Log.Message(LogTypes.Error, $"Received unhandled process state '{processStateInfo.State}' from '{processStateInfo.Alias}'."); break; } }
public static void HandleProcessStateInfo(ProcessStateInfo processStateInfo, IPCSession session) { switch (processStateInfo.State) { // TODO: Implement on childs. Called in ConsoleManager.Stop for now. case PipeProcessState.Started: Log.NewLine(); Log.Message(LogTypes.Info, $"'{processStateInfo.Alias}' successfully started."); break; case PipeProcessState.Stopped: ConsoleServiceManager.RemoveConsoleClient(processStateInfo.Alias); break; default: Log.Message(LogTypes.Warning, $"Received unhandled process state '{processStateInfo.State}' from '{processStateInfo.Alias}'."); break; } }
public static void HandleDetachConsole(DetachConsole detachConsole, IPCSession session) { ConsoleManager.Detach(detachConsole.Alias); }
public static void HandleRegisterConsole(RegisterConsole registerConsole, IPCSession session) { ConsoleManager.AddConsoleClient(registerConsole.Alias, session); }
public static void AddConsoleClient(string alias, IPCSession session) => consolePipeClients.Add(alias, session);