コード例 #1
0
        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");
            }
        }
コード例 #2
0
 public IpcEventArgs(IpcCommand command)
 {
     Command = command;
 }