Table of Contents

Class QueryContext

Namespace
Cratis.Applications.Queries
Assembly
Cratis.Applications.dll

Defines the context for a query.

public record QueryContext : IEquatable<QueryContext>
Inheritance
QueryContext
Implements
Inherited Members
Extension Methods

Constructors

QueryContext(FullyQualifiedQueryName, CorrelationId, Paging, Sorting, QueryArguments?, IEnumerable<object>?)

Defines the context for a query.

public QueryContext(FullyQualifiedQueryName Name, CorrelationId CorrelationId, Paging Paging, Sorting Sorting, QueryArguments? Arguments = null, IEnumerable<object>? Dependencies = null)

Parameters

Name FullyQualifiedQueryName

The name of the query.

CorrelationId CorrelationId

The CorrelationId for the query.

Paging Paging

The Paging information.

Sorting Sorting

The Sorting information.

Arguments QueryArguments

Optional arguments for the query.

Dependencies IEnumerable<object>

Optional dependencies required to handle the query.

Fields

NotSet

Represents a query context that is not set.

public static readonly QueryContext NotSet

Field Value

QueryContext

Properties

Arguments

Optional arguments for the query.

public QueryArguments? Arguments { get; init; }

Property Value

QueryArguments

CorrelationId

The CorrelationId for the query.

public CorrelationId CorrelationId { get; init; }

Property Value

CorrelationId

Dependencies

Optional dependencies required to handle the query.

public IEnumerable<object>? Dependencies { get; init; }

Property Value

IEnumerable<object>

Name

The name of the query.

public FullyQualifiedQueryName Name { get; init; }

Property Value

FullyQualifiedQueryName

Paging

The Paging information.

public Paging Paging { get; init; }

Property Value

Paging

Sorting

The Sorting information.

public Sorting Sorting { get; init; }

Property Value

Sorting

TotalItems

Gets or sets the total number of items in the query.

public int TotalItems { get; set; }

Property Value

int