public IMessagePipeEnd ConnectClient() { if (Interlocked.CompareExchange(ref _clientEnd, new ClientEnd(this), null) != null) { throw new InvalidOperationException(Resources.Exception_PipeHasClientEnd); } return _clientEnd; }