public void Send(string pipeName, IpcCommand command) { try { var clientStream = new NamedPipeClientStream(pipeName); try { clientStream.Connect(500); } catch (TimeoutException) { return; } clientStream.WriteByte((byte)command); clientStream.Close(); } catch (Exception ex) { Log.Error(ex, "failed to send pipe command"); } }
public IpcEventArgs(IpcCommand command) { Command = command; }