Table of Contents

Class QueryBase<TResponse>

Namespace
Excalibur.Application.Requests.Queries
Assembly
Excalibur.Application.dll

Represents the base class for queries that return a value.

public abstract class QueryBase<TResponse> : IQuery<TResponse>, IDispatchAction<TResponse>, IDispatchAction, IDispatchMessage, IActivity, IAmCorrelatable, IAmMultiTenant

Type Parameters

TResponse

The type of response returned by the query.

Inheritance
QueryBase<TResponse>
Implements
IQuery<TResponse>
IDispatchAction<TResponse>
Derived
Inherited Members

Remarks

Initializes a new instance of the QueryBase<TResponse> class with the specified correlation ID and tenant ID.

Constructors

QueryBase()

Initializes a new instance of the QueryBase<TResponse> class with default values.

protected QueryBase()

QueryBase(Guid, string?)

Represents the base class for queries that return a value.

protected QueryBase(Guid correlationId, string? tenantId = null)

Parameters

correlationId Guid

The correlation ID for the query.

tenantId string

The tenant ID associated with the query. Defaults to TenantDefaults.DefaultTenantId if not provided.

Remarks

Initializes a new instance of the QueryBase<TResponse> class with the specified correlation ID and tenant ID.

Properties

ActivityDescription

Gets the description of the activity.

public virtual string ActivityDescription { get; }

Property Value

string

The description of the activity.

ActivityDisplayName

Gets the display name of the activity.

public virtual string ActivityDisplayName { get; }

Property Value

string

The display name of the activity.

ActivityName

Gets the name of the activity.

public string ActivityName { get; }

Property Value

string

The name of the activity.

Headers

Gets the message headers.

public IReadOnlyDictionary<string, object> Headers { get; }

Property Value

IReadOnlyDictionary<string, object>

A read-only dictionary containing the query's metadata headers.

Id

Gets the unique identifier for this query as a GUID.

public Guid Id { get; protected init; }

Property Value

Guid

A unique identifier for this query instance.

MessageId

Gets the unique identifier for this query as a string.

public string MessageId { get; }

Property Value

string

The string representation of the query's unique identifier.

MessageType

Gets the type identifier for this query.

public string MessageType { get; }

Property Value

string

The fully qualified type name of the query.

TenantId

Gets the tenant identifier associated with the entity.

public string TenantId { get; }

Property Value

string

The tenant identifier associated with the entity.

TransactionBehavior

public TransactionScopeOption TransactionBehavior { get; protected init; }

Property Value

TransactionScopeOption

TransactionIsolation

public IsolationLevel TransactionIsolation { get; protected init; }

Property Value

IsolationLevel

TransactionTimeout

public TimeSpan TransactionTimeout { get; protected init; }

Property Value

TimeSpan