public override async void Start(FrameBase frameBase) { var frame = frameBase as RedirectedInputFrame; if (frame == null) { return; } Process process = ProcessList.Get(frame.Guid); if (process == null) { await SendError(frame, "Process has exited.").ConfigureAwait(false); } else { try { await process.StandardInput.WriteAsync(frame.Data).ConfigureAwait(false); } catch (Exception ex) { await SendError(frame, ex.Message).ConfigureAwait(false); } } }
public override void Start(FrameBase frameBase) { var frame = frameBase as KillFrame; if (frame == null) { return; } Process process = ProcessList.Get(frame.Guid); if (process != null) { try { process.Kill(); } catch { } } }