コード例 #1
0
 public void StartClient(string pipeNameInput, string pipeNameOutput)
 {
     _inClient    = new AnonymousPipeClientStream(PipeDirection.In, pipeNameInput);
     _outClient   = new AnonymousPipeClientStream(PipeDirection.Out, pipeNameOutput);
     _readStream  = new StreamString(_inClient);
     _writeStream = new StreamString(_outClient);
 }
コード例 #2
0
 public void StartClient(string pipeNameInput, string pipeNameOutput)
 {
     _inClient = new AnonymousPipeClientStream(PipeDirection.In, pipeNameInput);
     _outClient = new AnonymousPipeClientStream(PipeDirection.Out, pipeNameOutput);
     _readStream = new StreamString(_inClient);
     _writeStream = new StreamString(_outClient);
 }
コード例 #3
0
 public void StartServer(StartProcessDelegate startProcess)
 {
     _outServer   = new AnonymousPipeServerStream(PipeDirection.Out, HandleInheritability.Inheritable);
     _inServer    = new AnonymousPipeServerStream(PipeDirection.In, HandleInheritability.Inheritable);
     _readStream  = new StreamString(_inServer);
     _writeStream = new StreamString(_outServer);
     startProcess(_outServer.GetClientHandleAsString(), _inServer.GetClientHandleAsString());
     _outServer.DisposeLocalCopyOfClientHandle();
     _inServer.DisposeLocalCopyOfClientHandle();
 }
コード例 #4
0
 public void StartServer(StartProcessDelegate startProcess)
 {
     _outServer = new AnonymousPipeServerStream(PipeDirection.Out, HandleInheritability.Inheritable);
     _inServer = new AnonymousPipeServerStream(PipeDirection.In, HandleInheritability.Inheritable);
     _readStream = new StreamString(_inServer);
     _writeStream = new StreamString(_outServer);
     startProcess(_outServer.GetClientHandleAsString(), _inServer.GetClientHandleAsString());
     _outServer.DisposeLocalCopyOfClientHandle();
     _inServer.DisposeLocalCopyOfClientHandle();
 }
コード例 #5
0
 public void StartServer(StartProcessDelegate startProcess, bool disposeLocalClientHandle = true)
 {
     ArgUtil.NotNull(startProcess, nameof(startProcess));
     _outServer   = new AnonymousPipeServerStream(PipeDirection.Out, HandleInheritability.Inheritable);
     _inServer    = new AnonymousPipeServerStream(PipeDirection.In, HandleInheritability.Inheritable);
     _readStream  = new StreamString(_inServer);
     _writeStream = new StreamString(_outServer);
     startProcess(_outServer.GetClientHandleAsString(), _inServer.GetClientHandleAsString());
     if (disposeLocalClientHandle)
     {
         _outServer.DisposeLocalCopyOfClientHandle();
         _inServer.DisposeLocalCopyOfClientHandle();
     }
 }