Microsoft.R.Host.Broker.Pipes.MessagePipe.ConnectHost C# (CSharp) Method

ConnectHost() public method

Creates and returns the host end of the pipe.
Can only be called once for a given instance of MessagePipe. The returned object is owned by the pipe, and should not be disposed.
public ConnectHost ( int pid ) : IMessagePipeEnd
pid int
return IMessagePipeEnd
        public IMessagePipeEnd ConnectHost(int pid) {
            if (Interlocked.CompareExchange(ref _hostEnd, new HostEnd(this), null) != null) {
                throw new InvalidOperationException(Resources.Exception_PipeHasHostEnd);
            }

            _pid = pid;
            return _hostEnd;
        }