MemoryPoolHttpRequestStreamReaderFactory Class

An Microsoft.AspNetCore.Mvc.Internal.IHttpRequestStreamReaderFactory that uses pooled buffers.

Namespace
Microsoft.AspNetCore.Mvc.Internal
Assemblies
  • Microsoft.AspNetCore.Mvc.Core

Syntax

public class MemoryPoolHttpRequestStreamReaderFactory : IHttpRequestStreamReaderFactory
class Microsoft.AspNetCore.Mvc.Internal.MemoryPoolHttpRequestStreamReaderFactory

Constructors

MemoryPoolHttpRequestStreamReaderFactory(System.Buffers.ArrayPool<System.Byte>, System.Buffers.ArrayPool<System.Char>)

Creates a new Microsoft.AspNetCore.Mvc.Internal.MemoryPoolHttpRequestStreamReaderFactory.

Arguments:
  • bytePool (System.Buffers.ArrayPool<System.Byte>) – The System.Buffers.ArrayPool`1 for creating byte[] buffers.
  • charPool (System.Buffers.ArrayPool<System.Char>) – The System.Buffers.ArrayPool`1 for creating char[] buffers.
public MemoryPoolHttpRequestStreamReaderFactory(ArrayPool<byte> bytePool, ArrayPool<char> charPool)

Methods

CreateReader(System.IO.Stream, System.Text.Encoding)
Return type:System.IO.TextReader
public TextReader CreateReader(Stream stream, Encoding encoding)

Fields

DefaultBufferSize()

The default size of created char buffers.

Return type:System.Int32
public static readonly int DefaultBufferSize