/// <summary> /// Creates a new ReadOnlyPipeStream /// </summary> /// <param name="pipeReader">The PipeReader to read from.</param> public ReadOnlyPipeStream(PipeReader pipeReader) : this(pipeReader, allowSynchronousIO : true) { }
/// <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; }
public PipeReaderStream(PipeReader pipeReader, bool leaveOpen) { Debug.Assert(pipeReader != null); _pipeReader = pipeReader; LeaveOpen = leaveOpen; }
public PipeReaderStream(PipeReader pipeReader) { Debug.Assert(pipeReader != null); _pipeReader = pipeReader; }
public DuplexPipe(PipeReader reader, PipeWriter writer) { Input = reader; Output = writer; }
public StreamPipelineReader(PipeReader reader) => this.reader = reader;
public static Task CopyToEndAsync(this PipeReader input, Stream stream) { return(input.CopyToEndAsync(stream, 4096, CancellationToken.None)); }
public DuplexPipe(PipeReader input, PipeWriter output) { Input = input; Output = output; }
public DuplexPipe(Stream stream, StreamPipeReaderOptions?readerOptions = null, StreamPipeWriterOptions?writerOptions = null) { Input = PipeReader.Create(stream, readerOptions); Output = PipeWriter.Create(stream, writerOptions); }