139 references to Reader
Aspire.Hosting.Tests (1)
Dcp\ApplicationExecutorTests.cs (1)
454return s.Reader.AsStream();
ClientSample (2)
src\SignalR\common\Shared\DuplexPipe.cs (2)
23var transportToApplication = new DuplexPipe(output.Reader, input.Writer); 24var applicationToTransport = new DuplexPipe(input.Reader, output.Writer);
InMemory.FunctionalTests (4)
Http2\PipeReaderFactory.cs (2)
27return pipe.Reader; 33using (var registration = cancellationToken.Register(_cancelReader, pipe.Reader))
src\Servers\Kestrel\shared\test\Http3\Http3InMemory.cs (2)
1136_transportPipeReader = new CompletionPipeReader(_inputPipe.Reader); 1141new DuplexPipe(_outputPipe.Reader, _inputPipe.Writer));
Microsoft.AspNetCore.Components.Server (2)
Circuits\RemoteJSDataStream.cs (2)
79_pipeReaderStream = _pipe.Reader.AsStream(); 80PipeReader = _pipe.Reader;
Microsoft.AspNetCore.Grpc.JsonTranscoding.Tests (9)
ServerStreamingServerCallHandlerTests.cs (9)
66var line1 = await ReadLineAsync(pipe.Reader).DefaultTimeout(); 73var line2 = await ReadLineAsync(pipe.Reader).DefaultTimeout(); 110var line1 = await ReadLineAsync(pipe.Reader).DefaultTimeout(); 114var line2 = await ReadLineAsync(pipe.Reader).DefaultTimeout(); 152var line1 = await ReadLineAsync(pipe.Reader).DefaultTimeout(); 156var line2 = await ReadLineAsync(pipe.Reader).DefaultTimeout(); 193var line = await ReadLineAsync(pipe.Reader).DefaultTimeout(); 247var line1 = await ReadLineAsync(pipe.Reader).DefaultTimeout(); 254var line2 = await ReadLineAsync(pipe.Reader).DefaultTimeout();
Microsoft.AspNetCore.Http.Connections (3)
Internal\HttpConnectionContext.cs (1)
713var applicationToTransport = new DuplexPipe(input.Reader, Application.Output);
src\SignalR\common\Shared\DuplexPipe.cs (2)
23var transportToApplication = new DuplexPipe(output.Reader, input.Writer); 24var applicationToTransport = new DuplexPipe(input.Reader, output.Writer);
Microsoft.AspNetCore.Http.Connections.Client (3)
Internal\WebSocketsTransport.cs (1)
711var applicationToTransport = new DuplexPipe(input.Reader, _application!.Output);
src\SignalR\common\Shared\DuplexPipe.cs (2)
23var transportToApplication = new DuplexPipe(output.Reader, input.Writer); 24var applicationToTransport = new DuplexPipe(input.Reader, output.Writer);
Microsoft.AspNetCore.Http.Tests (1)
Features\FormFeatureTests.cs (1)
97mockFeature.Reader = pipe.Reader;
Microsoft.AspNetCore.OutputCaching.Tests (3)
CachedResponseBodyTests.cs (3)
34var receiverTask = ReceiveDataAsync(pipe.Reader, receivedSegments, cts.Token); 57var receiverTask = ReceiveDataAsync(pipe.Reader, receivedSegments, cts.Token); 81var receiverTask = ReceiveDataAsync(pipe.Reader, receivedSegments, cts.Token);
Microsoft.AspNetCore.ResponseCaching.Microbenchmarks (2)
ResponseCachingBenchmark.cs (2)
55var consumer = ConsumeAsync(pipe.Reader, CancellationToken.None); 73var consumer = ConsumeAsync(pipe.Reader, CancellationToken.None);
Microsoft.AspNetCore.ResponseCaching.Tests (3)
CachedResponseBodyTests.cs (3)
42var receiverTask = ReceiveDataAsync(pipe.Reader, receivedSegments, cts.Token); 64var receiverTask = ReceiveDataAsync(pipe.Reader, receivedSegments, cts.Token); 87var receiverTask = ReceiveDataAsync(pipe.Reader, receivedSegments, cts.Token);
Microsoft.AspNetCore.Server.IIS (9)
Core\IISHttpContext.IO.cs (3)
30var result = await _bodyInputPipe!.Reader.ReadAsync(cancellationToken); 48_bodyInputPipe.Reader.AdvanceTo(readableBuffer.End, readableBuffer.End); 60return _bodyInputPipe!.Reader.CopyToAsync(destination, cancellationToken);
Core\IISHttpContextOfT.cs (1)
101_bodyInputPipe?.Reader.Complete();
Core\OutputProducer.cs (3)
31public PipeReader Reader => _pipe.Reader; 37_pipe.Reader.CancelPendingRead(); 67_pipe.Reader.CancelPendingRead();
src\Shared\ServerInfrastructure\DuplexPipe.cs (2)
36var transportToApplication = new DuplexPipe(output.Reader, input.Writer); 37var applicationToTransport = new DuplexPipe(input.Reader, output.Writer);
Microsoft.AspNetCore.Server.Kestrel.Core (25)
Internal\Http\Http1ChunkedEncodingMessageBody.cs (5)
39_requestBodyPipe.Reader.AdvanceTo(consumed, examined); 46var boolResult = _requestBodyPipe.Reader.TryRead(out _readResult); 65var readAwaitable = _requestBodyPipe.Reader.ReadAsync(cancellationToken); 86_requestBodyPipe.Reader.CancelPendingRead(); 170_requestBodyPipe.Reader.Complete();
Internal\Http2\Http2Connection.cs (1)
209public PipeReader Input => _input.Reader;
Internal\Http2\Http2MessageBody.cs (7)
71_context.RequestBodyPipe.Reader.AdvanceTo(consumed, examined); 87var hasResult = _context.RequestBodyPipe.Reader.TryRead(out readResult); 111var readAwaitable = _context.RequestBodyPipe.Reader.ReadAsync(cancellationToken); 133_context.RequestBodyPipe.Reader.Complete(); 139return _context.RequestBodyPipe.Reader.CompleteAsync(); 144_context.RequestBodyPipe.Reader.CancelPendingRead(); 154_context.RequestBodyPipe.Reader.Complete();
Internal\Http2\Http2OutputProducer.cs (1)
71_pipeReader = _pipe.Reader;
Internal\Http2\Http2Stream.cs (1)
179RequestBodyPipe.Reader.Complete();
Internal\Http3\Http3MessageBody.cs (7)
46_context.RequestBodyPipe.Reader.AdvanceTo(consumed, examined); 55var hasResult = _context.RequestBodyPipe.Reader.TryRead(out readResult); 79var readAwaitable = _context.RequestBodyPipe.Reader.ReadAsync(cancellationToken); 101_context.RequestBodyPipe.Reader.Complete(); 107return _context.RequestBodyPipe.Reader.CompleteAsync(); 112_context.RequestBodyPipe.Reader.CancelPendingRead(); 122_context.RequestBodyPipe.Reader.Complete();
Internal\Http3\Http3OutputProducer.cs (1)
50_pipeReader = _pipe.Reader;
src\Shared\ServerInfrastructure\DuplexPipe.cs (2)
36var transportToApplication = new DuplexPipe(output.Reader, input.Writer); 37var applicationToTransport = new DuplexPipe(input.Reader, output.Writer);
Microsoft.AspNetCore.Server.Kestrel.Core.Tests (23)
BufferWriterTests.cs (4)
22Pipe.Reader.Complete(); 29ReadResult readResult = Pipe.Reader.ReadAsync().GetAwaiter().GetResult(); 31Pipe.Reader.AdvanceTo(readResult.Buffer.End); 202var readResult = Pipe.Reader.ReadAsync().GetAwaiter().GetResult();
Http1\Http1OutputProducerTests.cs (4)
51Assert.False(socketOutput.Pipe.Reader.TryRead(out var result)); 54socketOutput.Pipe.Reader.Complete(); 83socketOutput.Pipe.Reader.Complete(); 114socketOutput.Pipe.Reader.Complete();
Http2\Http2FrameWriterTests.cs (3)
45var payload = await pipe.Reader.ReadForLengthAsync(Http2FrameReader.HeaderLength + 4); 67var payload = await pipe.Reader.ReadForLengthAsync(Http2FrameReader.HeaderLength + 4); 85var payload = await pipe.Reader.ReadForLengthAsync(Http2FrameReader.HeaderLength);
Http3\Http3FrameWriterTests.cs (3)
47var payload = await pipe.Reader.ReadForLengthAsync(2); 66var payload = await pipe.Reader.ReadForLengthAsync(5); 84var payload = await pipe.Reader.ReadForLengthAsync(10);
PipelineExtensionTests.cs (9)
28_pipe.Reader.Complete(); 45var reader = _pipe.Reader.ReadAsync().GetAwaiter().GetResult(); 62var readResult = _pipe.Reader.ReadAsync().GetAwaiter().GetResult(); 66_pipe.Reader.AdvanceTo(readResult.Buffer.End); 88var reader = _pipe.Reader.ReadAsync().GetAwaiter().GetResult(); 114var reader = _pipe.Reader.ReadAsync().GetAwaiter().GetResult(); 142var reader = _pipe.Reader.ReadAsync().GetAwaiter().GetResult(); 160var reader = _pipe.Reader.ReadAsync().GetAwaiter().GetResult(); 193var reader = _pipe.Reader.ReadAsync().GetAwaiter().GetResult();
Microsoft.AspNetCore.Server.Kestrel.Microbenchmarks (13)
ChunkWriterBenchmark.cs (1)
25_reader = pipe.Reader;
PipeThroughputBenchmark.cs (4)
44var result = await _pipe.Reader.ReadAsync(); 46_pipe.Reader.AdvanceTo(result.Buffer.End, result.Buffer.End); 61var result = _pipe.Reader.ReadAsync().GetAwaiter().GetResult(); 62_pipe.Reader.AdvanceTo(result.Buffer.End, result.Buffer.End);
RequestParsingBenchmark.cs (6)
141var awaitable = Pipe.Reader.ReadAsync(); 166Pipe.Reader.AdvanceTo(readableBuffer.End); 173var awaitable = Pipe.Reader.ReadAsync(); 190Pipe.Reader.AdvanceTo(reader.Position, reader.Position); 192result = Pipe.Reader.ReadAsync().GetAwaiter().GetResult(); 200Pipe.Reader.AdvanceTo(reader.Position, reader.Position);
src\Servers\Kestrel\shared\test\Http3\Http3InMemory.cs (2)
1136_transportPipeReader = new CompletionPipeReader(_inputPipe.Reader); 1141new DuplexPipe(_outputPipe.Reader, _inputPipe.Writer));
Microsoft.AspNetCore.Server.Kestrel.Transport.NamedPipes (2)
src\Shared\ServerInfrastructure\DuplexPipe.cs (2)
36var transportToApplication = new DuplexPipe(output.Reader, input.Writer); 37var applicationToTransport = new DuplexPipe(input.Reader, output.Writer);
Microsoft.AspNetCore.Server.Kestrel.Transport.Quic (4)
Internal\QuicStreamContext.cs (2)
66_transportPipeReader = new CompletionPipeReader(_inputPipe.Reader); 69_originalApplication = new DuplexPipe(_outputPipe.Reader, _inputPipe.Writer);
src\Shared\ServerInfrastructure\DuplexPipe.cs (2)
36var transportToApplication = new DuplexPipe(output.Reader, input.Writer); 37var applicationToTransport = new DuplexPipe(input.Reader, output.Writer);
Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets (2)
src\Shared\ServerInfrastructure\DuplexPipe.cs (2)
36var transportToApplication = new DuplexPipe(output.Reader, input.Writer); 37var applicationToTransport = new DuplexPipe(input.Reader, output.Writer);
Microsoft.AspNetCore.Shared.Tests (2)
src\Shared\ServerInfrastructure\DuplexPipe.cs (2)
36var transportToApplication = new DuplexPipe(output.Reader, input.Writer); 37var applicationToTransport = new DuplexPipe(input.Reader, output.Writer);
Microsoft.AspNetCore.SignalR.Client.Tests (1)
SendUtilsTests.cs (1)
38var application = new DuplexPipe(pipe.Reader, pipe.Writer);
Microsoft.AspNetCore.SignalR.Specification.Tests (2)
src\SignalR\common\Shared\DuplexPipe.cs (2)
23var transportToApplication = new DuplexPipe(output.Reader, input.Writer); 24var applicationToTransport = new DuplexPipe(input.Reader, output.Writer);
Microsoft.AspNetCore.SignalR.Tests (4)
HubConnectionHandlerTests.cs (1)
5290var applicationToTransport = new DuplexPipe(input.Reader, connection.Application.Output);
Internal\MessageBufferTests.cs (3)
523var transportToApplication = new DuplexPipe(output.Reader, input.Writer); 524var applicationToTransport = new DuplexPipe(input.Reader, output.Writer); 548var applicationToTransport = new DuplexPipe(input.Reader, duplexPipePair.Application.Output);
Microsoft.AspNetCore.SignalR.Tests.Utils (2)
src\SignalR\common\Shared\DuplexPipe.cs (2)
23var transportToApplication = new DuplexPipe(output.Reader, input.Writer); 24var applicationToTransport = new DuplexPipe(input.Reader, output.Writer);
Microsoft.AspNetCore.TestHost (8)
HttpContextBuilder.cs (4)
65configureContext(_httpContext, _requestPipe.Reader); 134await _requestPipe.Reader.CompleteAsync(); 196return !_requestPipe.Reader.TryRead(out var result) || !result.IsCompleted; 264_requestPipe.Reader.CancelPendingRead();
ResponseBodyReaderStream.cs (4)
87var result = await _pipe.Reader.ReadAsync(cancellationToken); 105_pipe.Reader.AdvanceTo(readableBuffer.End); 124_pipe.Reader.CancelPendingRead(); 145_pipe.Reader.Complete();
Microsoft.AspNetCore.WebUtilities.Microbenchmarks (2)
FormReaderBenchmark.cs (2)
37var formReader = new FormPipeReader(pipe.Reader); 39pipe.Reader.Complete();
Microsoft.AspNetCore.WebUtilities.Tests (5)
FormPipeReaderTests.cs (5)
200() => ReadFormAsync(new FormPipeReader(bodyPipe.Reader) { ValueLengthLimit = 10 })); 209var readResult = await bodyPipe.Reader.ReadAsync(); 540var formReader = new FormPipeReader(pipe.Reader); 542pipe.Reader.Complete(); 636return bodyPipe.Reader;
Microsoft.CodeAnalysis.Remote.Workspaces (1)
RemoteCallback.cs (1)
114var readTask = ReadAsync(pipe.Reader);
System.IO.Pipelines (1)
System\IO\Pipelines\Pipe.cs (1)
1139Reader.Complete(ThrowHelper.CreateInvalidOperationException_NoConcurrentOperation());