37 instantiations of HttpResponseStreamWriter
Microsoft.AspNetCore.Components.Endpoints (2)
RazorComponentEndpointInvoker.cs (1)
85
await using var writer = new
HttpResponseStreamWriter
(context.Response.Body, Encoding.UTF8, defaultBufferSize, ArrayPool<byte>.Shared, ArrayPool<char>.Shared);
Results\RazorComponentResultExecutor.cs (1)
64
await using var writer = new
HttpResponseStreamWriter
(httpContext.Response.Body, Encoding.UTF8, defaultBufferSize, ArrayPool<byte>.Shared, ArrayPool<char>.Shared);
Microsoft.AspNetCore.Mvc.Core (1)
Infrastructure\MemoryPoolHttpResponseStreamWriterFactory.cs (1)
59
return new
HttpResponseStreamWriter
(stream, encoding, DefaultBufferSize, _bytePool, _charPool);
Microsoft.AspNetCore.Mvc.Core.TestCommon (1)
TestHttpResponseStreamWriterFactory.cs (1)
16
return new
HttpResponseStreamWriter
(stream, encoding, DefaultBufferSize);
Microsoft.AspNetCore.WebUtilities.Tests (33)
HttpResponseStreamWriterTest.cs (33)
20
var writer = new
HttpResponseStreamWriter
(memoryStream, encodingWithBOM);
38
var writer = new
HttpResponseStreamWriter
(stream, Encoding.UTF8);
54
var writer = new
HttpResponseStreamWriter
(stream, Encoding.UTF8);
73
var writer = new
HttpResponseStreamWriter
(stream, Encoding.UTF8);
94
var writer = new
HttpResponseStreamWriter
(stream, Encoding.UTF8);
111
var writer = new
HttpResponseStreamWriter
(stream, Encoding.UTF8);
130
var writer = new
HttpResponseStreamWriter
(stream, Encoding.UTF8);
149
var writer = new
HttpResponseStreamWriter
(stream, Encoding.UTF8);
168
var writer = new
HttpResponseStreamWriter
(stream, Encoding.UTF8);
189
var writer = new
HttpResponseStreamWriter
(stream, Encoding.UTF8);
214
var writer = new
HttpResponseStreamWriter
(stream, Encoding.UTF8);
238
var writer = new
HttpResponseStreamWriter
(stream, Encoding.UTF8);
260
var writer = new
HttpResponseStreamWriter
(stream, Encoding.UTF8);
293
var writer = new
HttpResponseStreamWriter
(stream, Encoding.UTF8);
317
var writer = new
HttpResponseStreamWriter
(stream, Encoding.UTF8);
341
var writer = new
HttpResponseStreamWriter
(stream, Encoding.UTF8);
364
var writer = new
HttpResponseStreamWriter
(stream, Encoding.UTF8);
383
using var writer = new
HttpResponseStreamWriter
(stream, Encoding.UTF8);
419
var writer = new
HttpResponseStreamWriter
(stream, Encoding.UTF8);
439
var writer = new
HttpResponseStreamWriter
(stream, Encoding.UTF8);
479
var writer = new
HttpResponseStreamWriter
(stream, Encoding.UTF8);
501
var writer = new
HttpResponseStreamWriter
(stream, Encoding.UTF8);
523
var writer = new
HttpResponseStreamWriter
(stream, Encoding.UTF8);
547
var writer = new
HttpResponseStreamWriter
(stream, Encoding.UTF8);
586
var writer = new
HttpResponseStreamWriter
(stream, Encoding.UTF8);
608
var writer = new
HttpResponseStreamWriter
(stream, Encoding.UTF8);
631
var writer = new
HttpResponseStreamWriter
(stream, encoding);
666
var writer = new
HttpResponseStreamWriter
(stream, encoding);
691
using (var writer = new
HttpResponseStreamWriter
(
717
var writer = new
HttpResponseStreamWriter
(stream, Encoding.Unicode);
736
var httpRequestStreamReader = new
HttpResponseStreamWriter
(stream, encoding, 1, bytePool, charPool);
766
var httpResponseStreamWriter = new
HttpResponseStreamWriter
(new MemoryStream(), Encoding.UTF8, 10, ArrayPool<byte>.Shared, ArrayPool<char>.Shared);
779
var httpResponseStreamWriter = new
HttpResponseStreamWriter
(new MemoryStream(), Encoding.UTF8, 10, ArrayPool<byte>.Shared, ArrayPool<char>.Shared);
84 references to HttpResponseStreamWriter
Microsoft.AspNetCore.Components.Endpoints (2)
RazorComponentEndpointInvoker.cs (1)
85
await using
var
writer = new HttpResponseStreamWriter(context.Response.Body, Encoding.UTF8, defaultBufferSize, ArrayPool<byte>.Shared, ArrayPool<char>.Shared);
Results\RazorComponentResultExecutor.cs (1)
64
await using
var
writer = new HttpResponseStreamWriter(httpContext.Response.Body, Encoding.UTF8, defaultBufferSize, ArrayPool<byte>.Shared, ArrayPool<char>.Shared);
Microsoft.AspNetCore.Mvc.Core (2)
Infrastructure\MemoryPoolHttpResponseStreamWriterFactory.cs (2)
18
/// The default size of buffers <see cref="
HttpResponseStreamWriter
"/>s will allocate.
21
/// 16K causes each <see cref="
HttpResponseStreamWriter
"/> to allocate one 16K
Microsoft.AspNetCore.WebUtilities (4)
HttpResponseStreamWriter.cs (4)
33
/// Initializes a new instance of <see cref="
HttpResponseStreamWriter
"/>.
43
/// Initializes a new instance of <see cref="
HttpResponseStreamWriter
"/>.
54
/// Initializes a new instance of <see cref="
HttpResponseStreamWriter
"/>.
674
return Task.FromException(new ObjectDisposedException(nameof(
HttpResponseStreamWriter
)));
Microsoft.AspNetCore.WebUtilities.Tests (76)
HttpResponseStreamWriterTest.cs (76)
12
private const int DefaultCharacterChunkSize =
HttpResponseStreamWriter
.DefaultBufferSize;
20
var
writer = new HttpResponseStreamWriter(memoryStream, encodingWithBOM);
38
var
writer = new HttpResponseStreamWriter(stream, Encoding.UTF8);
54
var
writer = new HttpResponseStreamWriter(stream, Encoding.UTF8);
73
var
writer = new HttpResponseStreamWriter(stream, Encoding.UTF8);
94
var
writer = new HttpResponseStreamWriter(stream, Encoding.UTF8);
111
var
writer = new HttpResponseStreamWriter(stream, Encoding.UTF8);
130
var
writer = new HttpResponseStreamWriter(stream, Encoding.UTF8);
133
var expectedWriteCount = Math.Ceiling((double)byteLength /
HttpResponseStreamWriter
.DefaultBufferSize);
149
var
writer = new HttpResponseStreamWriter(stream, Encoding.UTF8);
160
[InlineData(
HttpResponseStreamWriter
.DefaultBufferSize - 1)]
161
[InlineData(
HttpResponseStreamWriter
.DefaultBufferSize)]
162
[InlineData(
HttpResponseStreamWriter
.DefaultBufferSize + 1)]
163
[InlineData(
HttpResponseStreamWriter
.DefaultBufferSize * 2)]
168
var
writer = new HttpResponseStreamWriter(stream, Encoding.UTF8);
171
var expectedWriteCount = Math.Ceiling((double)byteLength /
HttpResponseStreamWriter
.DefaultBufferSize);
189
var
writer = new HttpResponseStreamWriter(stream, Encoding.UTF8);
214
var
writer = new HttpResponseStreamWriter(stream, Encoding.UTF8);
238
var
writer = new HttpResponseStreamWriter(stream, Encoding.UTF8);
255
[InlineData(
HttpResponseStreamWriter
.DefaultBufferSize + 1)]
260
var
writer = new HttpResponseStreamWriter(stream, Encoding.UTF8);
288
[InlineData(
HttpResponseStreamWriter
.DefaultBufferSize + 1, "\r\n")]
293
var
writer = new HttpResponseStreamWriter(stream, Encoding.UTF8);
317
var
writer = new HttpResponseStreamWriter(stream, Encoding.UTF8);
341
var
writer = new HttpResponseStreamWriter(stream, Encoding.UTF8);
359
[InlineData(
HttpResponseStreamWriter
.DefaultBufferSize + 1)]
364
var
writer = new HttpResponseStreamWriter(stream, Encoding.UTF8);
383
using
var
writer = new HttpResponseStreamWriter(stream, Encoding.UTF8);
412
[InlineData(
HttpResponseStreamWriter
.DefaultBufferSize + 1, 1)]
413
[InlineData(
HttpResponseStreamWriter
.DefaultBufferSize + 1, 2)]
414
[InlineData(
HttpResponseStreamWriter
.DefaultBufferSize + 1,
HttpResponseStreamWriter
.DefaultBufferSize)]
419
var
writer = new HttpResponseStreamWriter(stream, Encoding.UTF8);
439
var
writer = new HttpResponseStreamWriter(stream, Encoding.UTF8);
471
[InlineData(
HttpResponseStreamWriter
.DefaultBufferSize + 1, 1)]
472
[InlineData(
HttpResponseStreamWriter
.DefaultBufferSize + 1, 2)]
473
[InlineData(
HttpResponseStreamWriter
.DefaultBufferSize + 1,
HttpResponseStreamWriter
.DefaultBufferSize)]
479
var
writer = new HttpResponseStreamWriter(stream, Encoding.UTF8);
495
[InlineData(
HttpResponseStreamWriter
.DefaultBufferSize + 1)]
501
var
writer = new HttpResponseStreamWriter(stream, Encoding.UTF8);
517
[InlineData(
HttpResponseStreamWriter
.DefaultBufferSize + 1)]
523
var
writer = new HttpResponseStreamWriter(stream, Encoding.UTF8);
540
[InlineData(
HttpResponseStreamWriter
.DefaultBufferSize - 1)]
541
[InlineData(
HttpResponseStreamWriter
.DefaultBufferSize)]
547
var
writer = new HttpResponseStreamWriter(stream, Encoding.UTF8);
578
[InlineData(
HttpResponseStreamWriter
.DefaultBufferSize + 1, 1)]
579
[InlineData(
HttpResponseStreamWriter
.DefaultBufferSize + 1, 2)]
580
[InlineData(
HttpResponseStreamWriter
.DefaultBufferSize + 1,
HttpResponseStreamWriter
.DefaultBufferSize)]
586
var
writer = new HttpResponseStreamWriter(stream, Encoding.UTF8);
602
[InlineData(
HttpResponseStreamWriter
.DefaultBufferSize + 1)]
608
var
writer = new HttpResponseStreamWriter(stream, Encoding.UTF8);
631
var
writer = new HttpResponseStreamWriter(stream, encoding);
666
var
writer = new HttpResponseStreamWriter(stream, encoding);
691
using (
var
writer = new HttpResponseStreamWriter(
717
var
writer = new HttpResponseStreamWriter(stream, Encoding.Unicode);
736
var
httpRequestStreamReader = new HttpResponseStreamWriter(stream, encoding, 1, bytePool, charPool);
764
public static void StreamDisposed_ExpectedObjectDisposedException(Action<
HttpResponseStreamWriter
> action)
766
var
httpResponseStreamWriter = new HttpResponseStreamWriter(new MemoryStream(), Encoding.UTF8, 10, ArrayPool<byte>.Shared, ArrayPool<char>.Shared);
777
public static async Task StreamDisposed_ExpectedObjectDisposedExceptionAsync(Func<
HttpResponseStreamWriter
, Task> function)
779
var
httpResponseStreamWriter = new HttpResponseStreamWriter(new MemoryStream(), Encoding.UTF8, 10, ArrayPool<byte>.Shared, ArrayPool<char>.Shared);
856
yield return new object[] { new Action<
HttpResponseStreamWriter
>((httpResponseStreamWriter) =>
860
yield return new object[] { new Action<
HttpResponseStreamWriter
>((httpResponseStreamWriter) =>
864
yield return new object[] { new Action<
HttpResponseStreamWriter
>((httpResponseStreamWriter) =>
868
yield return new object[] { new Action<
HttpResponseStreamWriter
>((httpResponseStreamWriter) =>
873
yield return new object[] { new Action<
HttpResponseStreamWriter
>((httpResponseStreamWriter) =>
881
yield return new object[] { new Func<
HttpResponseStreamWriter
, Task>(async (httpResponseStreamWriter) =>
885
yield return new object[] { new Func<
HttpResponseStreamWriter
, Task>(async (httpResponseStreamWriter) =>
889
yield return new object[] { new Func<
HttpResponseStreamWriter
, Task>(async (httpResponseStreamWriter) =>
893
yield return new object[] { new Func<
HttpResponseStreamWriter
, Task>(async (httpResponseStreamWriter) =>
897
yield return new object[] { new Func<
HttpResponseStreamWriter
, Task>(async (httpResponseStreamWriter) =>
901
yield return new object[] { new Func<
HttpResponseStreamWriter
, Task>(async (httpResponseStreamWriter) =>
905
yield return new object[] { new Func<
HttpResponseStreamWriter
, Task>(async (httpResponseStreamWriter) =>
909
yield return new object[] { new Func<
HttpResponseStreamWriter
, Task>(async (httpResponseStreamWriter) =>
914
yield return new object[] { new Func<
HttpResponseStreamWriter
, Task>(async (httpResponseStreamWriter) =>