1 override of BodyReader
Microsoft.AspNetCore.Http (1)
Internal\DefaultHttpRequest.cs (1)
172
public override PipeReader
BodyReader
112 references to BodyReader
Aspire.Dashboard (3)
Otlp\Http\OtlpHttpEndpointsBuilder.cs (3)
184
result = await httpContext.Request.
BodyReader
.ReadAsync().ConfigureAwait(false);
205
httpContext.Request.
BodyReader
.AdvanceTo(result.Buffer.Start, result.Buffer.End);
215
httpContext.Request.
BodyReader
.AdvanceTo(result.Buffer.End);
InMemory.FunctionalTests (91)
ChunkedRequestTests.cs (18)
45
var readResult = await request.
BodyReader
.ReadAsync();
53
request.
BodyReader
.AdvanceTo(readResult.Buffer.End);
389
var result = await request.
BodyReader
.ReadAsync();
390
request.
BodyReader
.AdvanceTo(result.Buffer.End);
918
var readResult = await request.
BodyReader
.ReadAsync();
919
request.
BodyReader
.AdvanceTo(readResult.Buffer.End);
921
var requestTask = httpContext.Request.
BodyReader
.ReadAsync();
923
httpContext.Request.
BodyReader
.CancelPendingRead();
974
var readResult = await request.
BodyReader
.ReadAsync();
975
request.
BodyReader
.AdvanceTo(readResult.Buffer.End);
977
httpContext.Request.
BodyReader
.Complete();
979
await Assert.ThrowsAsync<InvalidOperationException>(async () => await request.
BodyReader
.ReadAsync());
1024
var readResult = await request.
BodyReader
.ReadAsync();
1025
request.
BodyReader
.AdvanceTo(readResult.Buffer.End);
1027
request.
BodyReader
.Complete();
1087
var readResult = await request.
BodyReader
.ReadAsync();
1088
request.
BodyReader
.AdvanceTo(readResult.Buffer.End);
1090
httpContext.Request.
BodyReader
.Complete(new Exception());
Http2\Http2ConnectionTests.cs (8)
1387
var readResult = await context.Request.
BodyReader
.ReadAsync();
1390
context.Request.
BodyReader
.AdvanceTo(readResult.Buffer.Start, readResult.Buffer.End);
1391
readResult = await context.Request.
BodyReader
.ReadAsync();
1394
context.Request.
BodyReader
.AdvanceTo(readResult.Buffer.Start, readResult.Buffer.End);
1396
readResult = await context.Request.
BodyReader
.ReadAsync();
1401
context.Request.
BodyReader
.AdvanceTo(readResult.Buffer.End);
5660
var result = await context.Request.
BodyReader
.ReadAsync().DefaultTimeout();
5663
context.Request.
BodyReader
.AdvanceTo(result.Buffer.Start, result.Buffer.End);
Http2\Http2StreamTests.cs (17)
189
return context.Request.
BodyReader
.CopyToAsync(context.Response.BodyWriter);
240
return context.Request.
BodyReader
.CopyToAsync(context.Response.BodyWriter);
998
var readResult = await context.Request.
BodyReader
.ReadAsync();
1001
context.Request.
BodyReader
.AdvanceTo(readResult.Buffer.Start, readResult.Buffer.End);
1002
readResult = await context.Request.
BodyReader
.ReadAsync();
1006
context.Request.
BodyReader
.AdvanceTo(readResult.Buffer.End);
1042
var readResult = await context.Request.
BodyReader
.ReadAsync();
1044
context.Request.
BodyReader
.AdvanceTo(readResult.Buffer.End);
1281
var readResult = await context.Request.
BodyReader
.ReadAsync();
1284
context.Request.
BodyReader
.AdvanceTo(readResult.Buffer.Start, readResult.Buffer.End);
1285
readResult = await context.Request.
BodyReader
.ReadAsync();
1289
context.Request.
BodyReader
.AdvanceTo(readResult.Buffer.End);
1291
readResult = await context.Request.
BodyReader
.ReadAsync();
5527
var requestBodyTask = context.Request.
BodyReader
.ReadAsync();
5546
await Assert.ThrowsAsync<ConnectionAbortedException>(async () => await context.Request.
BodyReader
.ReadAsync());
5693
var requestBodyTask = context.Request.
BodyReader
.ReadAsync();
5714
await Assert.ThrowsAsync<ConnectionAbortedException>(async () => await context.Request.
BodyReader
.ReadAsync());
Http3\Http3StreamTests.cs (8)
622
var readResult = await context.Request.
BodyReader
.ReadAsync();
625
context.Request.
BodyReader
.AdvanceTo(readResult.Buffer.Start, readResult.Buffer.End);
626
readResult = await context.Request.
BodyReader
.ReadAsync();
630
context.Request.
BodyReader
.AdvanceTo(readResult.Buffer.End);
1769
var requestBodyTask = context.Request.
BodyReader
.ReadAsync();
1788
await Assert.ThrowsAsync<ConnectionAbortedException>(async () => await context.Request.
BodyReader
.ReadAsync());
1896
var requestBodyTask = context.Request.
BodyReader
.ReadAsync();
1917
await Assert.ThrowsAsync<ConnectionAbortedException>(async () => await context.Request.
BodyReader
.ReadAsync());
KestrelMetricsTests.cs (1)
173
var result = await context.Request.
BodyReader
.ReadAsync();
RequestTests.cs (39)
96
var data = await context.Request.
BodyReader
.ReadAsync();
970
var readResult = await httpContext.Request.
BodyReader
.ReadAsync().AsTask().DefaultTimeout();
1017
var readResult = await httpContext.Request.
BodyReader
.ReadAsync();
1020
httpContext.Request.
BodyReader
.AdvanceTo(readResult.Buffer.End);
1049
var readResult = await httpContext.Request.
BodyReader
.ReadAsync();
1052
httpContext.Request.
BodyReader
.AdvanceTo(readResult.Buffer.Start, readResult.Buffer.End);
1053
readResult = await httpContext.Request.
BodyReader
.ReadAsync();
1055
httpContext.Request.
BodyReader
.AdvanceTo(readResult.Buffer.Start, readResult.Buffer.End);
1084
var readResult = await httpContext.Request.
BodyReader
.ReadAsync();
1087
httpContext.Request.
BodyReader
.AdvanceTo(readResult.Buffer.Start, readResult.Buffer.End);
1091
readResult = await httpContext.Request.
BodyReader
.ReadAsync();
1093
httpContext.Request.
BodyReader
.AdvanceTo(readResult.Buffer.Start, readResult.Buffer.End);
1127
await httpContext.Request.
BodyReader
.CopyToAsync(ms1);
1128
await httpContext.Request.
BodyReader
.CopyToAsync(ms2);
1184
var readResult = await ReadAtLeastAsync(httpContext.Request.
BodyReader
, numBytes: 3);
1188
httpContext.Request.
BodyReader
.AdvanceTo(readResult.Buffer.Start, readResult.Buffer.End);
1191
readResult = await httpContext.Request.
BodyReader
.ReadAsync();
1192
httpContext.Request.
BodyReader
.AdvanceTo(readResult.Buffer.Start, readResult.Buffer.End);
1196
readResult = await httpContext.Request.
BodyReader
.ReadAsync();
1200
httpContext.Request.
BodyReader
.AdvanceTo(readResult.Buffer.Start, readResult.Buffer.End);
1201
readResult = await httpContext.Request.
BodyReader
.ReadAsync();
1238
var readResult = await httpContext.Request.
BodyReader
.ReadAsync();
1240
httpContext.Request.
BodyReader
.AdvanceTo(readResult.Buffer.Start, readResult.Buffer.End);
1242
readResult = await httpContext.Request.
BodyReader
.ReadAsync();
1243
httpContext.Request.
BodyReader
.AdvanceTo(readResult.Buffer.Slice(1).Start, readResult.Buffer.End);
1910
var readResult = await request.
BodyReader
.ReadAsync();
1911
request.
BodyReader
.AdvanceTo(readResult.Buffer.End);
1913
var requestTask = httpContext.Request.
BodyReader
.ReadAsync();
1915
httpContext.Request.
BodyReader
.CancelPendingRead();
1960
var readResult = await request.
BodyReader
.ReadAsync();
1961
request.
BodyReader
.AdvanceTo(readResult.Buffer.End);
1963
httpContext.Request.
BodyReader
.Complete();
1965
await Assert.ThrowsAsync<InvalidOperationException>(async () => await request.
BodyReader
.ReadAsync());
2002
var readResult = await request.
BodyReader
.ReadAsync();
2003
request.
BodyReader
.AdvanceTo(readResult.Buffer.End);
2005
httpContext.Request.
BodyReader
.Complete();
2045
var readResult = await request.
BodyReader
.ReadAsync();
2046
request.
BodyReader
.AdvanceTo(readResult.Buffer.End);
2048
httpContext.Request.
BodyReader
.Complete(new Exception());
Interop.FunctionalTests (5)
Http3\Http3RequestTests.cs (1)
1353
await context.Request.
BodyReader
.ReadAtLeastAsync(TestData.Length);
HttpClientHttp2InteropTests.cs (4)
81
await context.Request.
BodyReader
.CopyToAsync(context.Response.BodyWriter).DefaultTimeout();
167
await context.Request.
BodyReader
.CopyToAsync(context.Response.BodyWriter).DefaultTimeout();
269
var reader = context.Request.
BodyReader
;
328
var reader = context.Request.
BodyReader
;
Microsoft.AspNetCore.Http (1)
Features\FormFeature.cs (1)
215
var formReader = new FormPipeReader(_request.
BodyReader
, encoding)
Microsoft.AspNetCore.Http.Extensions (1)
RequestDelegateFactory.cs (1)
101
private static readonly MemberExpression RequestPipeReaderExpr = Expression.Property(HttpRequestExpr, typeof(HttpRequest).GetProperty(nameof(HttpRequest.
BodyReader
))!);
Microsoft.AspNetCore.Http.Extensions.Tests (10)
RequestDelegateGenerator\RequestDelegateCreationTests.JsonBody.cs (10)
249
var result = await httpContext.Request.
BodyReader
.ReadAsync();
252
httpContext.Request.
BodyReader
.AdvanceTo(result.Buffer.End);
290
var result = await httpContext.Request.
BodyReader
.ReadAsync();
293
httpContext.Request.
BodyReader
.AdvanceTo(result.Buffer.End);
325
Assert.Same(httpContext.Request.
BodyReader
, pipeReader);
331
var result = await httpContext.Request.
BodyReader
.ReadAsync();
334
httpContext.Request.
BodyReader
.AdvanceTo(result.Buffer.End);
366
Assert.Same(httpContext.Request.
BodyReader
, pipeReader);
372
var result = await httpContext.Request.
BodyReader
.ReadAsync();
375
httpContext.Request.
BodyReader
.AdvanceTo(result.Buffer.End);
Microsoft.AspNetCore.Http.Tests (1)
Internal\DefaultHttpRequestTests.cs (1)
246
var bodyPipe = context.Request.
BodyReader
;