Table of Contents

Struct Utf8JsonReaderManager

Namespace
Microsoft.EntityFrameworkCore.Storage.Json
Assembly
Microsoft.EntityFrameworkCore.dll

Manages buffering underneath a Utf8JsonReader.

public ref struct Utf8JsonReaderManager
Inherited Members

Remarks

The consumer should call MoveNext() to advance to the next token in the JSON document, which may involve reading more data from the stream and creating a new Utf8JsonReader instance in CurrentReader.

Constructors

Utf8JsonReaderManager(JsonReaderData, IDiagnosticsLogger<Query>?)

Creates a new Utf8JsonReaderManager instance that will start reading at the position in the JSON document captured in the given JsonReaderData

public Utf8JsonReaderManager(JsonReaderData data, IDiagnosticsLogger<DbLoggerCategory.Query>? queryLogger)

Parameters

data JsonReaderData

The data.

queryLogger IDiagnosticsLogger<DbLoggerCategory.Query>

Logger for logging events that happen when reading/writing JSON values, or null if logging is not available.

Fields

CurrentReader

The Utf8JsonReader set to the next token to be consumed.

public Utf8JsonReader CurrentReader

Field Value

Utf8JsonReader

Data

Tracks state and underlying stream or buffer of UTF8 bytes.

public readonly JsonReaderData Data

Field Value

JsonReaderData

UseOldBehavior32235

This is an internal API that supports the Entity Framework Core infrastructure and not subject to the same compatibility standards as public APIs. It may be changed or removed without notice in any release. You should only use it directly in your code with extreme caution and knowing that doing so can result in application failures when updating to a new Entity Framework Core release.

public static readonly bool UseOldBehavior32235

Field Value

bool

Properties

QueryLogger

Logger for logging events that happen when reading/writing JSON values, or null if logging is not available.

public readonly IDiagnosticsLogger<DbLoggerCategory.Query>? QueryLogger { get; }

Property Value

IDiagnosticsLogger<DbLoggerCategory.Query>

Methods

CaptureState()

Called to capture the state of this Utf8JsonReaderManager into the associated JsonReaderData so that a new Utf8JsonReaderManager can later be created to pick up at the same position in the JSON document.

public void CaptureState()

MoveNext()

Moves to the next token, which may involve reading more data from the stream and creating a new Utf8JsonReader instance in CurrentReader.

public JsonTokenType MoveNext()

Returns

JsonTokenType

The token type of the current token.

Skip()

Skips the children of the current JSON token, which may involve reading more data from the stream and creating a new Utf8JsonReader instance in CurrentReader.

public void Skip()