/// <summary>
        /// Returns the stream used to send and receive data.
        /// </summary>
        /// <returns></returns>
        public Stream GetStream()
        {
            if (hPipe == IntPtr.Zero)
            {
                throw new ObjectDisposedException(GetType().FullName);
            }

            return(stream == null
               ? stream = new NamedPipeStream(this, false)
        : stream);
        }
示例#2
0
        /// <summary>
        /// Returns the stream used to send and receive data.
        /// </summary>
        /// <returns></returns>
        public Stream GetStream() 
        {
            if (hPipe == IntPtr.Zero)
                throw new ObjectDisposedException(GetType().FullName);

            return stream == null
                ? stream = new NamedPipeStream(this, false)
                : stream;
        }