Exemple #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)
 {
 }
Exemple #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;
 }
Exemple #3
0
 public PipeReaderStream(PipeReader pipeReader, bool leaveOpen)
 {
     Debug.Assert(pipeReader != null);
     _pipeReader = pipeReader;
     LeaveOpen   = leaveOpen;
 }
Exemple #4
0
 public PipeReaderStream(PipeReader pipeReader)
 {
     Debug.Assert(pipeReader != null);
     _pipeReader = pipeReader;
 }
Exemple #5
0
 public DuplexPipe(PipeReader reader, PipeWriter writer)
 {
     Input  = reader;
     Output = writer;
 }
Exemple #6
0
 public StreamPipelineReader(PipeReader reader) => this.reader = reader;
Exemple #7
0
 public static Task CopyToEndAsync(this PipeReader input, Stream stream)
 {
     return(input.CopyToEndAsync(stream, 4096, CancellationToken.None));
 }
Exemple #8
0
 public DuplexPipe(PipeReader input, PipeWriter output)
 {
     Input  = input;
     Output = output;
 }
Exemple #9
0
 public DuplexPipe(Stream stream, StreamPipeReaderOptions?readerOptions = null, StreamPipeWriterOptions?writerOptions = null)
 {
     Input  = PipeReader.Create(stream, readerOptions);
     Output = PipeWriter.Create(stream, writerOptions);
 }