362 references to Buffer
Aspire.Dashboard (5)
Otlp\Http\OtlpHttpEndpointsBuilder.cs (5)
191if (result.Buffer.Length > MaxRequestSize) 205httpContext.Request.BodyReader.AdvanceTo(result.Buffer.Start, result.Buffer.End); 209return exporter(result.Buffer); 215httpContext.Request.BodyReader.AdvanceTo(result.Buffer.End);
Aspire.Hosting (2)
Dcp\DcpHostService.cs (2)
361LogLines(result.Buffer, out var position); 363reader.AdvanceTo(position, result.Buffer.End);
ClientSample (2)
RawSample.cs (1)
80var buffer = result.Buffer;
Tcp\TcpConnection.cs (1)
222var buffer = result.Buffer;
http2cat (1)
src\Shared\ServerInfrastructure\DuplexPipeStream.cs (1)
122var readableBuffer = result.Buffer;
IIS.FunctionalTests (1)
src\Shared\ServerInfrastructure\DuplexPipeStream.cs (1)
122var readableBuffer = result.Buffer;
IIS.LongTests (1)
src\Shared\ServerInfrastructure\DuplexPipeStream.cs (1)
122var readableBuffer = result.Buffer;
IIS.NewHandler.FunctionalTests (1)
src\Shared\ServerInfrastructure\DuplexPipeStream.cs (1)
122var readableBuffer = result.Buffer;
IIS.NewShim.FunctionalTests (1)
src\Shared\ServerInfrastructure\DuplexPipeStream.cs (1)
122var readableBuffer = result.Buffer;
IIS.ShadowCopy.Tests (1)
src\Shared\ServerInfrastructure\DuplexPipeStream.cs (1)
122var readableBuffer = result.Buffer;
IISExpress.FunctionalTests (1)
src\Shared\ServerInfrastructure\DuplexPipeStream.cs (1)
122var readableBuffer = result.Buffer;
InMemory.FunctionalTests (72)
ChunkedRequestTests.cs (7)
51await response.BodyWriter.WriteAsync(readResult.Buffer.ToArray()); 53request.BodyReader.AdvanceTo(readResult.Buffer.End); 390request.BodyReader.AdvanceTo(result.Buffer.End); 919request.BodyReader.AdvanceTo(readResult.Buffer.End); 975request.BodyReader.AdvanceTo(readResult.Buffer.End); 1025request.BodyReader.AdvanceTo(readResult.Buffer.End); 1088request.BodyReader.AdvanceTo(readResult.Buffer.End);
Http2\Http2ConnectionTests.cs (11)
1388while (readResult.Buffer.Length != _maxData.Length * 4) 1390context.Request.BodyReader.AdvanceTo(readResult.Buffer.Start, readResult.Buffer.End); 1394context.Request.BodyReader.AdvanceTo(readResult.Buffer.Start, readResult.Buffer.End); 1397Assert.Equal(readResult.Buffer.Length, _maxData.Length * 5); 1399await context.Response.BodyWriter.WriteAsync(readResult.Buffer.ToArray()); 1401context.Request.BodyReader.AdvanceTo(readResult.Buffer.End); 5662result.Buffer.CopyTo(buffer); 5663context.Request.BodyReader.AdvanceTo(result.Buffer.Start, result.Buffer.End);
Http2\Http2StreamTests.cs (10)
1001context.Request.BodyReader.AdvanceTo(readResult.Buffer.Start, readResult.Buffer.End); 1005Assert.Equal(12, readResult.Buffer.Length); 1006context.Request.BodyReader.AdvanceTo(readResult.Buffer.End); 1043Assert.Equal(1, readResult.Buffer.Length); 1044context.Request.BodyReader.AdvanceTo(readResult.Buffer.End); 1284context.Request.BodyReader.AdvanceTo(readResult.Buffer.Start, readResult.Buffer.End); 1288Assert.Equal(12, readResult.Buffer.Length); 1289context.Request.BodyReader.AdvanceTo(readResult.Buffer.End);
Http2\TlsTests.cs (1)
110var buffer = result.Buffer;
Http3\Http3StreamTests.cs (4)
625context.Request.BodyReader.AdvanceTo(readResult.Buffer.Start, readResult.Buffer.End); 629Assert.Equal(12, readResult.Buffer.Length); 630context.Request.BodyReader.AdvanceTo(readResult.Buffer.End);
KestrelMetricsTests.cs (3)
176Assert.True(result.Buffer.Length > 0); 177Assert.Equal(result.Buffer.ToSpan(), "Hello World?"u8[..(int)result.Buffer.Length]);
RequestTests.cs (34)
1019Assert.Equal(5, readResult.Buffer.Length); 1020httpContext.Request.BodyReader.AdvanceTo(readResult.Buffer.End); 1051Assert.Equal(5, readResult.Buffer.Length); 1052httpContext.Request.BodyReader.AdvanceTo(readResult.Buffer.Start, readResult.Buffer.End); 1054Assert.Equal(5, readResult.Buffer.Length); 1055httpContext.Request.BodyReader.AdvanceTo(readResult.Buffer.Start, readResult.Buffer.End); 1086Assert.Equal(5, readResult.Buffer.Length); 1087httpContext.Request.BodyReader.AdvanceTo(readResult.Buffer.Start, readResult.Buffer.End); 1092Assert.Equal(5, readResult.Buffer.Length); 1093httpContext.Request.BodyReader.AdvanceTo(readResult.Buffer.Start, readResult.Buffer.End); 1167while (!result.IsCompleted && result.Buffer.Length < numBytes) 1169reader.AdvanceTo(result.Buffer.Start, result.Buffer.End); 1173if (result.Buffer.Length < numBytes) 1185Assert.Equal(3, readResult.Buffer.Length); 1188httpContext.Request.BodyReader.AdvanceTo(readResult.Buffer.Start, readResult.Buffer.End); 1192httpContext.Request.BodyReader.AdvanceTo(readResult.Buffer.Start, readResult.Buffer.End); 1197Assert.Equal(5, readResult.Buffer.Length); 1200httpContext.Request.BodyReader.AdvanceTo(readResult.Buffer.Start, readResult.Buffer.End); 1240httpContext.Request.BodyReader.AdvanceTo(readResult.Buffer.Start, readResult.Buffer.End); 1243httpContext.Request.BodyReader.AdvanceTo(readResult.Buffer.Slice(1).Start, readResult.Buffer.End); 1911request.BodyReader.AdvanceTo(readResult.Buffer.End); 1961request.BodyReader.AdvanceTo(readResult.Buffer.End); 2003request.BodyReader.AdvanceTo(readResult.Buffer.End); 2046request.BodyReader.AdvanceTo(readResult.Buffer.End);
src\Servers\Kestrel\shared\test\Http3\Http3InMemory.cs (2)
552var buffer = result.Buffer; 929var readableBuffer = result.Buffer;
Interop.FunctionalTests (16)
HttpClientHttp2InteropTests.cs (16)
274while (!readResult.IsCompleted && readResult.Buffer.Length < "Hello World".Length) 276reader.AdvanceTo(readResult.Buffer.Start, readResult.Buffer.End); 280var sequence = readResult.Buffer.Slice(0, "Hello World".Length); 287Assert.True(finalResult.IsCompleted && finalResult.Buffer.Length == 0); 331while (!readResult.IsCompleted && readResult.Buffer.Length < "Hello World".Length) 333reader.AdvanceTo(readResult.Buffer.Start, readResult.Buffer.End); 337var sequence = readResult.Buffer.Slice(0, "Hello World".Length); 347while (!readResult.IsCompleted && readResult.Buffer.Length < "Hello World".Length) 349reader.AdvanceTo(readResult.Buffer.Start, readResult.Buffer.End); 353Assert.True(readResult.Buffer.IsSingleSegment); 354var result = Encoding.UTF8.GetString(readResult.Buffer.FirstSpan); 355reader.AdvanceTo(readResult.Buffer.End); 358Assert.True(finalResult.IsCompleted && finalResult.Buffer.Length == 0);
Microsoft.AspNetCore.Grpc.JsonTranscoding.Tests (1)
ServerStreamingServerCallHandlerTests.cs (1)
268var buffer = result.Buffer;
Microsoft.AspNetCore.Http.Connections (3)
Internal\Transports\LongPollingServerTransport.cs (1)
37var buffer = result.Buffer;
Internal\Transports\ServerSentEventsServerTransport.cs (1)
52var buffer = result.Buffer;
Internal\Transports\WebSocketsServerTransport.cs (1)
209var buffer = result.Buffer;
Microsoft.AspNetCore.Http.Connections.Client (2)
Internal\SendUtils.cs (1)
28var buffer = result.Buffer;
Internal\WebSocketsTransport.cs (1)
541var buffer = result.Buffer;
Microsoft.AspNetCore.Http.Connections.Tests (22)
HttpConnectionDispatcherTests.cs (17)
245Assert.Equal("Hi", Encoding.UTF8.GetString(result.Buffer.ToArray())); 246connection.Transport.Input.AdvanceTo(result.Buffer.End); 481await connectionContext.Transport.Output.WriteAsync(result.Buffer.First); 545await connectionContext.Transport.Output.WriteAsync(result.Buffer.First); 613Assert.Equal("Hello World", Encoding.UTF8.GetString(result.Buffer.ToArray())); 615connection.Transport.Input.AdvanceTo(result.Buffer.End); 3818connection.Transport.Input.AdvanceTo(result.Buffer.End); 3862await connection.Transport.Output.WriteAsync(result.Buffer.ToArray()); 3866connection.Transport.Input.AdvanceTo(result.Buffer.End); 3895connection.Transport.Input.AdvanceTo(result.Buffer.End); 3924connection.Transport.Input.AdvanceTo(result.Buffer.End); 3947await connection.Transport.Output.WriteAsync(result.Buffer.ToArray()); 3951connection.Transport.Input.AdvanceTo(result.Buffer.End); 3974await connection.Transport.Output.WriteAsync(result.Buffer.ToArray()); 3978connection.Transport.Input.AdvanceTo(result.Buffer.End); 4022await _writer.WriteAsync(res.Buffer.ToArray()); 4026connection.Transport.Input.AdvanceTo(res.Buffer.End);
HttpConnectionManagerTests.cs (2)
110connection.Transport.Input.AdvanceTo(result.Buffer.End); 259connection.Transport.Input.AdvanceTo(result.Buffer.End);
MapConnectionHandlerTests.cs (1)
444connection.Transport.Input.AdvanceTo(result.Buffer.Start);
WebSocketsTests.cs (2)
55var buffer = result.Buffer; 133connection.Transport.Input.AdvanceTo(result.Buffer.End);
Microsoft.AspNetCore.Http.Extensions.Tests (10)
RequestDelegateGenerator\RequestDelegateCreationTests.JsonBody.cs (10)
250Assert.Equal(requestBodyBytes.Length, result.Buffer.Length); 251Assert.Equal(requestBodyBytes, result.Buffer.ToArray()); 252httpContext.Request.BodyReader.AdvanceTo(result.Buffer.End); 291Assert.Equal(requestBodyBytes.Length, result.Buffer.Length); 292Assert.Equal(requestBodyBytes, result.Buffer.ToArray()); 293httpContext.Request.BodyReader.AdvanceTo(result.Buffer.End); 332Assert.Equal(0, result.Buffer.Length); 334httpContext.Request.BodyReader.AdvanceTo(result.Buffer.End); 373Assert.Equal(0, result.Buffer.Length); 375httpContext.Request.BodyReader.AdvanceTo(result.Buffer.End);
Microsoft.AspNetCore.Http.Tests (1)
Features\RequestBodyPipeFeatureTests.cs (1)
67return Encoding.ASCII.GetString(data.Buffer.ToArray());
Microsoft.AspNetCore.OutputCaching.Tests (1)
CachedResponseBodyTests.cs (1)
101var buffer = result.Buffer;
Microsoft.AspNetCore.ResponseCaching.Microbenchmarks (1)
ResponseCachingBenchmark.cs (1)
99var buffer = result.Buffer;
Microsoft.AspNetCore.ResponseCaching.Tests (1)
CachedResponseBodyTests.cs (1)
106var buffer = result.Buffer;
Microsoft.AspNetCore.Server.HttpSys.FunctionalTests (1)
src\Shared\ServerInfrastructure\DuplexPipeStream.cs (1)
122var readableBuffer = result.Buffer;
Microsoft.AspNetCore.Server.IIS (3)
Core\IISHttpContext.IO.cs (2)
31var readableBuffer = result.Buffer; 165var buffer = result.Buffer;
src\Shared\ServerInfrastructure\DuplexPipeStream.cs (1)
122var readableBuffer = result.Buffer;
Microsoft.AspNetCore.Server.Kestrel.Core (46)
Internal\Http\Http1ChunkedEncodingMessageBody.cs (3)
49CountBytesRead(readResult.Buffer.Length); 74StopTimingRead(_readResult.Buffer.Length); 113var readableBuffer = result.Buffer;
Internal\Http\Http1Connection.cs (3)
723var reader = new SequenceReader<byte>(result.Buffer); 737OnBadRequest(result.Buffer, ex); 748Input.AdvanceTo(reader.Position, isConsumed ? reader.Position : result.Buffer.End);
Internal\Http\Http1ContentLengthMessageBody.cs (9)
39return new ReadResult(_readResult.Buffer, Interlocked.Exchange(ref _userCanceled, 0) == 1, isCompleted: true); 78_context.Input.AdvanceTo(_readResult.Buffer.Start); 126readResult = new ReadResult(_readResult.Buffer, Interlocked.Exchange(ref _userCanceled, 0) == 1, isCompleted: true); 151_context.Input.AdvanceTo(_readResult.Buffer.Start); 162_context.Input.AdvanceTo(_readResult.Buffer.Start); 187var initialLength = _readResult.Buffer.Length; 197_readResult.Buffer.Slice(0, maxLength), 216var buffer = _readResult.Buffer.Slice(consumed, _readResult.Buffer.End);
Internal\Http\Http1MessageBody.cs (2)
55AdvanceTo(readResult.Buffer.End); 94AdvanceTo(result.Buffer.End);
Internal\Http\HttpRequestStream.cs (1)
125var buffer = result.Buffer;
Internal\Http\MessageBody.cs (7)
286examinedLength = readResult.Buffer.Slice(readResult.Buffer.Start, examined).Length; 291consumedLength = readResult.Buffer.Slice(readResult.Buffer.Start, consumed).Length; 292examinedLength = consumedLength + readResult.Buffer.Slice(consumed, examined).Length; 295if (examined.Equals(readResult.Buffer.End)) 301totalLength = readResult.Buffer.Length;
Internal\Http2\Http2Connection.cs (5)
321var buffer = result.Buffer; 554var readableBuffer = result.Buffer; 1859if ((readResult.IsCompleted && readResult.Buffer.Length == 0) || readResult.IsCanceled) 1867var copyAmount = (int)Math.Min(outputBuffer.Length, readResult.Buffer.Length); 1868var bufferSlice = readResult.Buffer.Slice(0, copyAmount);
Internal\Http2\Http2FrameWriter.cs (1)
193var buffer = readResult.Buffer;
Internal\Http2\Http2MessageBody.cs (2)
93CountBytesRead(readResult.Buffer.Length); 120StopTimingRead(_readResult.Buffer.Length);
Internal\Http3\Http3ControlStream.cs (3)
154var readableBuffer = result.Buffer; 253var readableBuffer = result.Buffer; 292var readableBuffer = result.Buffer;
Internal\Http3\Http3MessageBody.cs (2)
61CountBytesRead(readResult.Buffer.Length); 88StopTimingRead(_readResult.Buffer.Length);
Internal\Http3\Http3OutputProducer.cs (5)
427if (readResult.Buffer.Length > 0) 429flushResult = await _frameWriter.WriteDataAsync(readResult.Buffer); 437if (readResult.Buffer.Length != 0) 452flushResult = await _frameWriter.WriteDataAsync(readResult.Buffer); 455_pipeReader.AdvanceTo(readResult.Buffer.End);
Internal\Http3\Http3PendingStream.cs (1)
57var readableBuffer = result.Buffer;
Internal\Http3\Http3Stream.cs (1)
615var readableBuffer = result.Buffer;
src\Shared\ServerInfrastructure\DuplexPipeStream.cs (1)
122var readableBuffer = result.Buffer;
Microsoft.AspNetCore.Server.Kestrel.Core.Tests (64)
BufferWriterTests.cs (3)
30byte[] data = readResult.Buffer.ToArray(); 31Pipe.Reader.AdvanceTo(readResult.Buffer.End); 206Assert.Equal(13, readResult.Buffer.Length);
Http1\Http1ConnectionTests.cs (25)
35var readableBuffer = (await _transport.Input.ReadAsync()).Buffer; 54var readableBuffer = (await _transport.Input.ReadAsync()).Buffer; 67var readableBuffer = (await _transport.Input.ReadAsync()).Buffer; 78var readableBuffer = (await _transport.Input.ReadAsync()).Buffer; 95var readableBuffer = (await _transport.Input.ReadAsync()).Buffer; 121var readableBuffer = (await _transport.Input.ReadAsync()).Buffer; 136readableBuffer = (await _transport.Input.ReadAsync()).Buffer; 200SequencePosition consumed = read.Buffer.Start; 201SequencePosition examined = read.Buffer.End; 220consumed = read.Buffer.Start; 221examined = read.Buffer.End; 223SequenceReader<byte> reader = new SequenceReader<byte>(read.Buffer); 274var readableBuffer = (await _transport.Input.ReadAsync()).Buffer; 286readableBuffer = (await _transport.Input.ReadAsync()).Buffer; 411var readableBuffer = (await _transport.Input.ReadAsync()).Buffer; 434var readableBuffer = (await _transport.Input.ReadAsync()).Buffer; 450ParseRequest((await _transport.Input.ReadAsync()).Buffer, out _consumed, out _examined); 464var readableBuffer = (await _transport.Input.ReadAsync()).Buffer; 477var readableBuffer = (await _transport.Input.ReadAsync()).Buffer; 491var readableBuffer = (await _transport.Input.ReadAsync()).Buffer; 508var readableBuffer = (await _transport.Input.ReadAsync()).Buffer; 525var readableBuffer = (await _transport.Input.ReadAsync()).Buffer; 542var readableBuffer = (await _transport.Input.ReadAsync()).Buffer; 557var readableBuffer = (await _transport.Input.ReadAsync()).Buffer; 846var readableBuffer = (await _transport.Input.ReadAsync()).Buffer;
Http2\Http2FrameWriterTests.cs (1)
105var buffer = result.Buffer;
MessageBodyTests.cs (26)
71Assert.Equal(5, readResult.Buffer.Length); 72AssertASCII("Hello", readResult.Buffer); 73reader.AdvanceTo(readResult.Buffer.End); 77reader.AdvanceTo(readResult.Buffer.End); 98Assert.Equal(5, readResult.Buffer.Length); 99AssertASCII("Hello", readResult.Buffer); 100reader.AdvanceTo(readResult.Buffer.End); 104reader.AdvanceTo(readResult.Buffer.End); 896Assert.Equal(6, readResult.Buffer.Length); 897body.AdvanceTo(readResult.Buffer.End); 902Assert.Equal(6, readResult.Buffer.Length); 903body.AdvanceTo(readResult.Buffer.End); 1096AssertASCII("Hello", readResult.Buffer); 1098reader.AdvanceTo(readResult.Buffer.End); 1104reader.AdvanceTo(readResult.Buffer.End); 1123AssertASCII("Hello", readResult.Buffer); 1125reader.AdvanceTo(readResult.Buffer.End); 1150reader.AdvanceTo(readResult.Buffer.End); 1176reader.AdvanceTo(readResult.Buffer.End); 1201reader.AdvanceTo(readResult.Buffer.End); 1249reader.AdvanceTo(readResult.Buffer.Start, readResult.Buffer.End); 1310reader.AdvanceTo(readResult.Buffer.End); 1334reader.AdvanceTo(readResult.Buffer.End); 1360reader.AdvanceTo(readResult.Buffer.End); 1386reader.AdvanceTo(readResult.Buffer.End);
PipelineExtensionTests.cs (9)
48AssertExtensions.Equal(expected, reader.Buffer.Slice(0, numAsStr.Length).ToArray()); 65AssertExtensions.Equal(expected, readResult.Buffer.Slice(0, numAsStr.Length).ToArray()); 66_pipe.Reader.AdvanceTo(readResult.Buffer.End); 90var written = reader.Buffer.Slice(spacer.Length, numAsString.Length); 120reader.Buffer.ToArray()); 124Assert.Equal(0, reader.Buffer.Length); 144Assert.Equal(input.Length, reader.Buffer.Length); 161var data = reader.Buffer.Slice(0, maxAscii).ToArray(); 194var written = reader.Buffer.Slice(spacer.Length, stringLength);
Microsoft.AspNetCore.Server.Kestrel.Microbenchmarks (15)
ChunkWriterBenchmark.cs (2)
40_reader.AdvanceTo(result.Buffer.End, result.Buffer.End);
Http2\Http2ConnectionBenchmarkBase.cs (1)
157var buffer = result.Buffer;
InMemoryTransportBenchmark.cs (2)
197var buffer = result.Buffer; 214var buffer = result.Buffer;
PipeThroughputBenchmark.cs (5)
45remaining -= result.Buffer.Length; 46_pipe.Reader.AdvanceTo(result.Buffer.End, result.Buffer.End); 62_pipe.Reader.AdvanceTo(result.Buffer.End, result.Buffer.End);
RequestParsingBenchmark.cs (3)
148var readableBuffer = awaitable.GetAwaiter().GetResult().Buffer; 181var readableBuffer = result.Buffer; 193readableBuffer = result.Buffer;
src\Servers\Kestrel\shared\test\Http3\Http3InMemory.cs (2)
552var buffer = result.Buffer; 929var readableBuffer = result.Buffer;
Microsoft.AspNetCore.Server.Kestrel.Transport.NamedPipes (1)
Internal\NamedPipeConnection.cs (1)
163var buffer = result.Buffer;
Microsoft.AspNetCore.Server.Kestrel.Transport.Quic (1)
Internal\QuicStreamContext.cs (1)
397var buffer = result.Buffer;
Microsoft.AspNetCore.Server.Kestrel.Transport.Quic.Tests (4)
QuicConnectionContextTests.cs (3)
110Assert.Equal(TestData, read.Buffer.ToArray()); 111serverStream.Transport.Input.AdvanceTo(read.Buffer.End); 613serverStream.Transport.Input.AdvanceTo(readResult.Buffer.End);
QuicTestHelpers.cs (1)
156serverStream.Transport.Input.AdvanceTo(readResult.Buffer.End);
Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets (1)
Internal\SocketConnection.cs (1)
280var buffer = result.Buffer;
Microsoft.AspNetCore.Shared.Tests (1)
src\Shared\ServerInfrastructure\DuplexPipeStream.cs (1)
122var readableBuffer = result.Buffer;
Microsoft.AspNetCore.SignalR.Client.Core (2)
HubConnection.cs (2)
1512var buffer = result.Buffer; 1631var buffer = result.Buffer;
Microsoft.AspNetCore.SignalR.Client.Tests (3)
HttpConnectionTests.Transport.cs (1)
410Assert.Equal("This is a test", Encoding.UTF8.GetString(message.Buffer));
TestConnection.cs (1)
149var buffer = result.Buffer;
TestTransport.cs (1)
73Application.Input.AdvanceTo(result.Buffer.End);
Microsoft.AspNetCore.SignalR.Core (2)
HubConnectionContext.cs (1)
512var buffer = result.Buffer;
HubConnectionHandler.cs (1)
274var buffer = result.Buffer;
Microsoft.AspNetCore.SignalR.Microbenchmarks (1)
BroadcastBenchmark.cs (1)
79var buffer = result.Buffer;
Microsoft.AspNetCore.SignalR.Specification.Tests (2)
src\SignalR\common\testassets\Tests.Utils\TestClient.cs (2)
249var buffer = result.Buffer; 282var buffer = result.Buffer;
Microsoft.AspNetCore.SignalR.Tests (29)
AuthConnectionHandler.cs (1)
19var buffer = result.Buffer;
EchoConnectionHandler.cs (1)
17var buffer = result.Buffer;
HttpHeaderConnectionHandler.cs (1)
19var buffer = result.Buffer;
Internal\MessageBufferTests.cs (25)
36var buffer = res.Buffer; 61var buffer = res.Buffer; 75buffer = res.Buffer; 102var buffer = res.Buffer; 111buffer = res.Buffer; 136var buffer = res.Buffer; 151buffer = res.Buffer; 160buffer = res.Buffer; 185var buffer = res.Buffer; 198buffer = res.Buffer; 209buffer = res.Buffer; 230var buffer = res.Buffer; 262var buffer = res.Buffer; 273buffer = res.Buffer; 299var buffer = res.Buffer; 313buffer = res.Buffer; 343var buffer = res.Buffer; 352buffer = res.Buffer; 379var buffer = res.Buffer; 391buffer = res.Buffer; 423var buffer = res.Buffer; 431buffer = res.Buffer; 470var buffer = res.Buffer; 480buffer = res.Buffer; 489buffer = res.Buffer;
WriteThenCloseConnectionHandler.cs (1)
15var buffer = result.Buffer;
Microsoft.AspNetCore.SignalR.Tests.Utils (18)
PipeReaderExtensions.cs (16)
18if (!result.Buffer.IsEmpty) 31pipeReader.AdvanceTo(result.Buffer.Start, result.Buffer.Start); 44return result.Buffer.ToArray(); 48pipeReader.AdvanceTo(result.Buffer.End); 58if (result.Buffer.Length < numBytes) 60pipeReader.AdvanceTo(result.Buffer.Start, result.Buffer.End); 64pipeReader.AdvanceTo(result.Buffer.GetPosition(numBytes)); 77return result.Buffer.ToArray(); 81pipeReader.AdvanceTo(result.Buffer.Start, result.Buffer.End); 90if (result.Buffer.Length < numBytes) 92pipeReader.AdvanceTo(result.Buffer.Start, result.Buffer.End); 96var buffer = result.Buffer.Slice(0, numBytes);
TestClient.cs (2)
249var buffer = result.Buffer; 282var buffer = result.Buffer;
Microsoft.AspNetCore.TestHost (2)
ResponseBodyReaderStream.cs (2)
94if (result.Buffer.IsEmpty && result.IsCompleted) 101var readableBuffer = result.Buffer;
Microsoft.AspNetCore.WebUtilities (1)
FormPipeReader.cs (1)
98var buffer = readResult.Buffer;
Microsoft.AspNetCore.WebUtilities.Tests (5)
FormPipeReaderTests.cs (5)
114Assert.Equal(Encoding.UTF8.GetBytes(content), readResult.Buffer.ToArray()); 129Assert.Equal(Encoding.UTF8.GetBytes(content), readResult.Buffer.ToArray()); 157Assert.Equal(Encoding.UTF8.GetBytes(content), readResult.Buffer.ToArray()); 185Assert.Equal(Encoding.UTF8.GetBytes(content), readResult.Buffer.ToArray()); 210Assert.Equal(Encoding.UTF8.GetBytes("baz=12345678901"), readResult.Buffer.ToArray());
Microsoft.CodeAnalysis.Remote.Workspaces (2)
RemoteHostAssetReader.cs (2)
122var sequenceReader = new SequenceReader<byte>(readResult.Buffer); 130var sequenceReader = new SequenceReader<byte>(readResult.Buffer);
SignalR.Client.FunctionalTestApp (2)
EchoConnectionHandler.cs (2)
16var buffer = result.Buffer; 31connection.Transport.Input.AdvanceTo(result.Buffer.End);
SignalRSamples (1)
ConnectionHandlers\MessagesConnectionHandler.cs (1)
28var buffer = result.Buffer;
SocialWeather (1)
SocialWeatherConnectionHandler.cs (1)
38var buffer = result.Buffer;
Sockets.FunctionalTests (2)
src\Servers\Kestrel\test\FunctionalTests\UnixDomainSocketsTests.cs (2)
63await connection.Transport.Output.WriteAsync(result.Buffer.ToArray()); 65connection.Transport.Input.AdvanceTo(result.Buffer.End);
System.IO.Pipelines (6)
System\IO\Pipelines\PipeReader.cs (4)
71ReadOnlySequence<byte> buffer = result.Buffer; 86/// The <see cref="System.IO.Pipelines.ReadResult.Buffer" /> previously returned from <see cref="System.IO.Pipelines.PipeReader.ReadAsync(System.Threading.CancellationToken)" /> must not be accessed after this call. 96/// The <see cref="System.IO.Pipelines.ReadResult.Buffer" /> previously returned from <see cref="System.IO.Pipelines.PipeReader.ReadAsync(System.Threading.CancellationToken)" /> must not be accessed after this call. 237ReadOnlySequence<byte> buffer = result.Buffer;
System\IO\Pipelines\PipeReaderStream.cs (1)
118ReadOnlySequence<byte> sequence = result.Buffer;
System\IO\Pipelines\StreamPipeReader.cs (1)
226|| readResult.Buffer.Length >= minimumSize