Skip to content

IJsonSchemaResultsCollector.BeginChildContext Method

Definition

Namespace: Corvus.Text.Json
Assembly: Corvus.Text.Json.dll

Overloads

Method Description
BeginChildContext(int, JsonSchemaPathProvider, JsonSchemaPathProvider, JsonSchemaPathProvider) Begin a child context.
BeginChildContext(int, ReadOnlySpan<byte>, JsonSchemaPathProvider, JsonSchemaPathProvider) Begin a child context for a property evaluation.
BeginChildContext(int, int, JsonSchemaPathProvider, JsonSchemaPathProvider) Begin a child context for an item evaluation.
BeginChildContext(int, TProviderContext, JsonSchemaPathProvider<TProviderContext>, JsonSchemaPathProvider<TProviderContext>, JsonSchemaPathProvider<TProviderContext>) Begin a child context.

BeginChildContext(int, JsonSchemaPathProvider, JsonSchemaPathProvider, JsonSchemaPathProvider)

Source: IJsonSchemaResultsCollector.cs

Begin a child context.

public abstract int BeginChildContext(int parentSequenceNumber, JsonSchemaPathProvider reducedEvaluationPath, JsonSchemaPathProvider schemaEvaluationPath, JsonSchemaPathProvider documentEvaluationPath)

Parameters

Name Type Description
parentSequenceNumber int The sequence number of the parent context.
reducedEvaluationPath JsonSchemaPathProvider The path taken through the schema(s). (optional)
schemaEvaluationPath JsonSchemaPathProvider The schema evaluation path. (optional)
documentEvaluationPath JsonSchemaPathProvider The path in the JSON document instance. (optional)

Returns

int

The sequence number of the child context.

Remarks

Begins evaluation of a schema in a child context. The context may later be committed with CommitChildContext or abandoned with PopChildContext. In DEBUG builds, the sequence number returned by the call to BeginChildContext is passed to the commit or pop methods and validated to ensure that completion operations are carried out in the expected order.

Applies To

Product Versions
.NET 9, 10
.NET Standard 2.0, 2.1

BeginChildContext(int, ReadOnlySpan<byte>, JsonSchemaPathProvider, JsonSchemaPathProvider)

Source: IJsonSchemaResultsCollector.cs

Begin a child context for a property evaluation.

public abstract int BeginChildContext(int parentSequenceNumber, ReadOnlySpan<byte> escapedPropertyName, JsonSchemaPathProvider reducedEvaluationPath, JsonSchemaPathProvider schemaEvaluationPath)

Parameters

Name Type Description
parentSequenceNumber int The sequence number of the parent context.
escapedPropertyName ReadOnlySpan<byte> The escaped name of the property for which to begin a child context.
reducedEvaluationPath JsonSchemaPathProvider The fully reduced evaluation path for the keyword. (optional)
schemaEvaluationPath JsonSchemaPathProvider The schema evaluation path of the target schema. (optional)

Returns

int

The sequence number of the child context.

Remarks

Begins evaluation of a schema in a child context. The context may later be committed with CommitChildContext or abandoned with PopChildContext.

Applies To

Product Versions
.NET 9, 10
.NET Standard 2.0, 2.1

BeginChildContext(int, int, JsonSchemaPathProvider, JsonSchemaPathProvider)

Source: IJsonSchemaResultsCollector.cs

Begin a child context for an item evaluation.

public abstract int BeginChildContext(int parentSequenceNumber, int itemIndex, JsonSchemaPathProvider reducedEvaluationPath, JsonSchemaPathProvider schemaEvaluationPath)

Parameters

Name Type Description
parentSequenceNumber int The sequence number of the parent context.
itemIndex int The index of the item for which to begin a child context.
reducedEvaluationPath JsonSchemaPathProvider The fully reduced evaluation path for the keyword. (optional)
schemaEvaluationPath JsonSchemaPathProvider The schema evaluation path of the target schema. (optional)

Returns

int

The sequence number of the child context.

Remarks

Begins evaluation of a schema in a child context. The context may later be committed with CommitChildContext or abandoned with PopChildContext.

Applies To

Product Versions
.NET 9, 10
.NET Standard 2.0, 2.1

BeginChildContext(int, TProviderContext, JsonSchemaPathProvider<TProviderContext>, JsonSchemaPathProvider<TProviderContext>, JsonSchemaPathProvider<TProviderContext>)

Source: IJsonSchemaResultsCollector.cs

Begin a child context.

public abstract int BeginChildContext<TProviderContext>(int parentSequenceNumber, TProviderContext providerContext, JsonSchemaPathProvider<TProviderContext> reducedEvaluationPath, JsonSchemaPathProvider<TProviderContext> schemaEvaluationPath, JsonSchemaPathProvider<TProviderContext> documentEvaluationPath)

Parameters

Name Type Description
parentSequenceNumber int The sequence number of the parent context.
providerContext TProviderContext The context to be passed to the path provider.
reducedEvaluationPath JsonSchemaPathProvider<TProviderContext> The path taken through the schema(s) at which the child context is being evaluated.
schemaEvaluationPath JsonSchemaPathProvider<TProviderContext> The schema evaluation path.
documentEvaluationPath JsonSchemaPathProvider<TProviderContext> The path in the JSON document instance at which the child context is being evaluated.

Returns

int

The sequence number of the child context.

Remarks

Begins evaluation of a schema in a child context. The context may later be committed with CommitChildContext or abandoned with PopChildContext. A child context operates like a stack. You must pop/commit child contexts in reverse order of that in which you Begin() a child context. The sequence number returned by BeginChildContext and passed in to CommitChildContext or PopChildContext is used to enforce this

Applies To

Product Versions
.NET 9, 10
.NET Standard 2.0, 2.1

Collaborate with us on GitHub

The source for this content can be found on GitHub, where you can also create and review issues and pull requests.

Open an issue