예제 #1
0
 /// <summary>
 /// Creates a new ReadOnlyPipeStream
 /// </summary>
 /// <param name="pipeReader">The PipeReader to read from.</param>
 public ReadOnlyPipeStream(PipeReader pipeReader) :
     this(pipeReader, allowSynchronousIO : true)
 {
 }
예제 #2
0
 /// <summary>
 /// Creates a new ReadOnlyPipeStream
 /// </summary>
 /// <param name="pipeReader">The PipeReader to read from.</param>
 /// <param name="allowSynchronousIO">Whether synchronous IO is allowed.</param>
 public ReadOnlyPipeStream(PipeReader pipeReader, bool allowSynchronousIO)
 {
     _allowSynchronousIO = allowSynchronousIO;
     InnerPipeReader     = pipeReader;
 }
예제 #3
0
 public PipeReaderStream(PipeReader pipeReader, bool leaveOpen)
 {
     Debug.Assert(pipeReader != null);
     _pipeReader = pipeReader;
     LeaveOpen   = leaveOpen;
 }
예제 #4
0
 public PipeReaderStream(PipeReader pipeReader)
 {
     Debug.Assert(pipeReader != null);
     _pipeReader = pipeReader;
 }
예제 #5
0
 public DuplexPipe(PipeReader reader, PipeWriter writer)
 {
     Input  = reader;
     Output = writer;
 }
예제 #6
0
 public StreamPipelineReader(PipeReader reader) => this.reader = reader;
예제 #7
0
 public static Task CopyToEndAsync(this PipeReader input, Stream stream)
 {
     return(input.CopyToEndAsync(stream, 4096, CancellationToken.None));
 }
예제 #8
0
 public DuplexPipe(PipeReader input, PipeWriter output)
 {
     Input  = input;
     Output = output;
 }
예제 #9
0
 public DuplexPipe(Stream stream, StreamPipeReaderOptions?readerOptions = null, StreamPipeWriterOptions?writerOptions = null)
 {
     Input  = PipeReader.Create(stream, readerOptions);
     Output = PipeWriter.Create(stream, writerOptions);
 }