コード例 #1
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);
        }
コード例 #2
0
ファイル: NamedPipeSocket.cs プロジェクト: nlhepler/mono
        /// <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;
        }