153 references to Writer
Aspire.Hosting.Tests (2)
Dcp\ApplicationExecutorTests.cs (2)
485await pipes.StandardOut.Writer.WriteAsync(Encoding.UTF8.GetBytes("2024-08-19T06:10:33.473275911Z Hello world" + Environment.NewLine)); 496await pipes.StandardErr.Writer.WriteAsync(Encoding.UTF8.GetBytes("2024-08-19T06:10:32.661Z Next" + Environment.NewLine));
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 (5)
Http2\PipeReaderFactory.cs (3)
37await stream.CopyToAsync(new DuplexPipeStream(null, pipe.Writer), bufferSize: 4096, cancellationToken); 45pipe.Writer.Complete(ex); 48pipe.Writer.Complete();
src\Servers\Kestrel\shared\test\Http3\Http3InMemory.cs (2)
1137_transportPipeWriter = new CompletionPipeWriter(_outputPipe.Writer); 1141new DuplexPipe(_outputPipe.Reader, _inputPipe.Writer));
Microsoft.AspNetCore.Components.Server (2)
Circuits\RemoteJSDataStream.cs (2)
125await _pipe.Writer.WriteAsync(chunk, _streamCancellationToken); 219await _pipe.Writer.CompleteAsync(ex);
Microsoft.AspNetCore.Grpc.JsonTranscoding.Tests (5)
ServerStreamingServerCallHandlerTests.cs (5)
56var httpContext = TestHelpers.CreateHttpContext(bodyStream: pipe.Writer.AsStream()); 103var httpContext = TestHelpers.CreateHttpContext(bodyStream: pipe.Writer.AsStream()); 145var httpContext = TestHelpers.CreateHttpContext(bodyStream: pipe.Writer.AsStream()); 186var httpContext = TestHelpers.CreateHttpContext(bodyStream: pipe.Writer.AsStream()); 237var httpContext = TestHelpers.CreateHttpContext(bodyStream: pipe.Writer.AsStream());
Microsoft.AspNetCore.Http.Connections (3)
Internal\HttpConnectionContext.cs (1)
712var transportToApplication = new DuplexPipe(Transport.Input, input.Writer);
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)
710var transportToApplication = new DuplexPipe(_transport!.Input, input.Writer);
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 (2)
Features\FormFeatureTests.cs (2)
93await pipe.Writer.WriteAsync(formContent); 94pipe.Writer.Complete();
Microsoft.AspNetCore.OutputCaching.Tests (4)
CachedResponseBodyTests.cs (4)
35var copyTask = RecyclableReadOnlySequenceSegment.CopyToAsync(body, pipe.Writer, cts.Token).AsTask().ContinueWith(t => pipe.Writer.CompleteAsync(t.Exception)); 58var copyTask = CopyDataAsync(body, pipe.Writer, cts.Token); 82var copyTask = CopyDataAsync(body, pipe.Writer, cts.Token);
Microsoft.AspNetCore.ResponseCaching.Microbenchmarks (3)
ResponseCachingBenchmark.cs (3)
65await pipe.Writer.CompleteAsync(); 80await pipe.Writer.CompleteAsync(); 89features.Set<IHttpResponseBodyFeature>(new PipeResponseBodyFeature(pipe.Writer));
Microsoft.AspNetCore.ResponseCaching.Tests (4)
CachedResponseBodyTests.cs (4)
43var copyTask = body.CopyToAsync(pipe.Writer, cts.Token).ContinueWith(_ => pipe.Writer.CompleteAsync()); 65var copyTask = CopyDataAsync(body, pipe.Writer, cts.Token); 88var copyTask = CopyDataAsync(body, pipe.Writer, cts.Token);
Microsoft.AspNetCore.Server.IIS (11)
Core\IISHttpContext.IO.cs (4)
103var memory = _bodyInputPipe!.Writer.GetMemory(); 117_bodyInputPipe.Writer.Advance(read); 125var result = await _bodyInputPipe.Writer.FlushAsync(); 151_bodyInputPipe!.Writer.Complete(error);
Core\OutputProducer.cs (5)
39return FlushAsync(_pipe.Writer, cancellationToken); 52_pipe.Writer.Complete(); 68_pipe.Writer.Complete(); 81_pipe.Writer.Write(buffer.Span); 84return FlushAsync(_pipe.Writer, cancellationToken);
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 (18)
Internal\Http\Http1ChunkedEncodingMessageBody.cs (3)
127done = Read(readableBuffer, _requestBodyPipe.Writer, out consumed, out examined); 129await _requestBodyPipe.Writer.FlushAsync(); 158await _requestBodyPipe.Writer.CompleteAsync(error);
Internal\Http2\Http2Connection.cs (1)
193_inputTask = CopyPipeAsync(_context.Transport.Input, _input.Writer);
Internal\Http2\Http2OutputProducer.cs (1)
70_pipeWriter = new ConcurrentPipeWriter(_pipe.Writer, _memoryPool, _dataWriterLock);
Internal\Http2\Http2Stream.cs (5)
173RequestBodyPipe.Writer.Complete(); 504dataPayload.CopyTo(RequestBodyPipe.Writer); 510var flushTask = RequestBodyPipe.Writer.FlushAsync(); 545RequestBodyPipe.Writer.Complete(); 624RequestBodyPipe.Writer.Complete(abortReason);
Internal\Http3\Http3OutputProducer.cs (1)
49_pipeWriter = _pipe.Writer;
Internal\Http3\Http3Stream.cs (5)
185RequestBodyPipe.Writer.Complete(exception); 558RequestBodyPipe.Writer.Complete(); 748return RequestBodyPipe.Writer.CompleteAsync(); 914RequestBodyPipe.Writer.Write(segment.Span); 917return RequestBodyPipe.Writer.FlushAsync().GetAsTask();
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 (35)
BufferWriterTests.cs (19)
21Pipe.Writer.Complete(); 27Pipe.Writer.FlushAsync().GetAwaiter().GetResult(); 28Pipe.Writer.Complete(); 44BufferWriter<PipeWriter> writer = new BufferWriter<PipeWriter>(Pipe.Writer); 77BufferWriter<PipeWriter> writer = new BufferWriter<PipeWriter>(Pipe.Writer); 94BufferWriter<PipeWriter> writer = new BufferWriter<PipeWriter>(Pipe.Writer); 108BufferWriter<PipeWriter> writer = new BufferWriter<PipeWriter>(Pipe.Writer); 120BufferWriter<PipeWriter> writer = new BufferWriter<PipeWriter>(Pipe.Writer); 134Memory<byte> memory = Pipe.Writer.GetMemory(); 135BufferWriter<PipeWriter> writer = new BufferWriter<PipeWriter>(Pipe.Writer); 150BufferWriter<PipeWriter> writer = new BufferWriter<PipeWriter>(Pipe.Writer); 160int initialLength = Pipe.Writer.GetMemory().Length; 161BufferWriter<PipeWriter> writer = new BufferWriter<PipeWriter>(Pipe.Writer); 169int initialLength = Pipe.Writer.GetMemory().Length; 171BufferWriter<PipeWriter> writer = new BufferWriter<PipeWriter>(Pipe.Writer); 178Assert.Equal(Pipe.Writer.GetMemory().Length, writer.Span.Length); 185BufferWriter<PipeWriter> writer = new BufferWriter<PipeWriter>(Pipe.Writer); 201Pipe.Writer.FlushAsync().GetAwaiter().GetResult(); 221BufferWriter<PipeWriter> writer = new BufferWriter<PipeWriter>(Pipe.Writer);
Http1\Http1OutputProducerTests.cs (4)
53socketOutput.Pipe.Writer.Complete(); 82socketOutput.Pipe.Writer.Complete(); 113socketOutput.Pipe.Writer.Complete(); 255: base(pipe.Writer, connectionId, connectionContext, memoryPool, log, timeoutControl, minResponseDataRateFeature, metricsContext, outputAborter)
Http2\Http2FrameWriterTests.cs (3)
53return new Http2FrameWriter(pipe.Writer, null, null, 1, null, null, null, _dirtyMemoryPool, serviceContext); 81Http2FrameWriter.WriteHeader(frame, pipe.Writer); 82await pipe.Writer.FlushAsync();
Http3\Http3FrameWriterTests.cs (1)
92frameWriter.Reset(pipe.Writer, null);
PipelineExtensionTests.cs (8)
29_pipe.Writer.Complete(); 39var writerBuffer = _pipe.Writer; 56var writerBuffer = _pipe.Writer; 76var writerBuffer = _pipe.Writer; 107var pipeWriter = _pipe.Writer; 137var writerBuffer = _pipe.Writer; 151var writerBuffer = _pipe.Writer; 180var writerBuffer = _pipe.Writer;
Microsoft.AspNetCore.Server.Kestrel.Microbenchmarks (12)
ChunkWriterBenchmark.cs (1)
26_writer = pipe.Writer;
Http2\Http2FrameWriterBenchmark.cs (1)
78_pipe.Writer.Complete();
PipeThroughputBenchmark.cs (6)
33_pipe.Writer.GetMemory(_writeLength); 34_pipe.Writer.Advance(_writeLength); 35await _pipe.Writer.FlushAsync(); 58_pipe.Writer.GetMemory(_writeLength); 59_pipe.Writer.Advance(_writeLength); 60_pipe.Writer.FlushAsync().GetAwaiter().GetResult();
RequestParsingBenchmark.cs (2)
134Pipe.Writer.Write(bytes); 136Pipe.Writer.FlushAsync().GetAwaiter().GetResult();
src\Servers\Kestrel\shared\test\Http3\Http3InMemory.cs (2)
1137_transportPipeWriter = new CompletionPipeWriter(_outputPipe.Writer); 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)
67_transportPipeWriter = new CompletionPipeWriter(_outputPipe.Writer); 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)
5289var transportToApplication = new DuplexPipe(connection.Transport.Input, input.Writer);
Internal\MessageBufferTests.cs (3)
523var transportToApplication = new DuplexPipe(output.Reader, input.Writer); 524var applicationToTransport = new DuplexPipe(input.Reader, output.Writer); 547var transportToApplication = new DuplexPipe(duplexPipePair.Transport.Input, input.Writer);
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 (11)
HttpContextBuilder.cs (2)
108var requestTask = _sendRequestStream(_requestPipe.Writer); 263_requestPipe.Writer.CancelPendingFlush();
ResponseBodyPipeWriter.cs (9)
30return await _pipe.Writer.FlushAsync(cancellationToken); 47_pipe.Writer.Complete(new IOException(string.Empty, innerException)); 59_pipe.Writer.Complete(); 79public override void CancelPendingFlush() => _pipe.Writer.CancelPendingFlush(); 84_pipe.Writer.Advance(bytes); 90return _pipe.Writer.GetMemory(sizeHint); 96return _pipe.Writer.GetSpan(sizeHint); 99public override bool CanGetUnflushedBytes => _pipe.Writer.CanGetUnflushedBytes; 101public override long UnflushedBytes => _pipe.Writer.UnflushedBytes;
Microsoft.AspNetCore.WebUtilities.Microbenchmarks (2)
FormReaderBenchmark.cs (2)
35pipe.Writer.Write(bytes); 36pipe.Writer.Complete();
Microsoft.AspNetCore.WebUtilities.Tests (8)
FormPipeReaderTests.cs (8)
196await bodyPipe.Writer.WriteAsync(Encoding.UTF8.GetBytes(content1)); 197await bodyPipe.Writer.FlushAsync(); 202await bodyPipe.Writer.WriteAsync(Encoding.UTF8.GetBytes(content2)); 203bodyPipe.Writer.Complete(); 538pipe.Writer.Write(bytes); 539pipe.Writer.Complete(); 632await bodyPipe.Writer.WriteAsync(formContent); 635bodyPipe.Writer.Complete();
Microsoft.CodeAnalysis.Remote.Workspaces (1)
RemoteCallback.cs (1)
113var writeTask = WriteAsync(_callback, pipe.Writer);
System.IO.Pipelines (1)
System\IO\Pipelines\Pipe.cs (1)
926Writer.Complete(ThrowHelper.CreateInvalidOperationException_NoConcurrentOperation());