Class ObservableQuerySubscriptionRequest

Namespace
Cratis.Arc.Queries
Assembly
Cratis.Arc.Core.dll

Represents the payload of an Subscribe message sent by the client.

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

Constructors

ObservableQuerySubscriptionRequest(ObservableQuerySubscriptionRequest)

protected ObservableQuerySubscriptionRequest(ObservableQuerySubscriptionRequest original)

Parameters

original ObservableQuerySubscriptionRequest

ObservableQuerySubscriptionRequest(string, IDictionary<string, string?>?, int?, int?, string?, string?, string?)

Represents the payload of an Subscribe message sent by the client.

public ObservableQuerySubscriptionRequest(string QueryName, IDictionary<string, string?>? Arguments = null, int? Page = null, int? PageSize = null, string? SortBy = null, string? SortDirection = null, string? TransferMode = null)

Parameters

QueryName string

The fully qualified name of the observable query to subscribe to (e.g. MyApp.Features.Authors.Listing.AllAuthors).

Arguments IDictionary<string, string>

Optional query-string arguments passed to the query performer.

Page int?

Optional zero-based page index for paged queries.

PageSize int?

Optional page size for paged queries.

SortBy string

Optional field name to sort by.

SortDirection string

Optional sort direction (asc or desc).

TransferMode string

Optional transfer mode (delta or full). When delta, the server sends the full snapshot on the first emission and only the change set on subsequent ones. When full, the server always sends the complete snapshot without a change set. Defaults to legacy behavior (snapshot plus change set) when omitted.

Properties

Arguments

Optional query-string arguments passed to the query performer.

public IDictionary<string, string?>? Arguments { get; init; }

Property Value

IDictionary<string, string>

EqualityContract

protected virtual Type EqualityContract { get; }

Property Value

Type

Page

Optional zero-based page index for paged queries.

public int? Page { get; init; }

Property Value

int?

PageSize

Optional page size for paged queries.

public int? PageSize { get; init; }

Property Value

int?

QueryName

The fully qualified name of the observable query to subscribe to (e.g. MyApp.Features.Authors.Listing.AllAuthors).

public string QueryName { get; init; }

Property Value

string

SortBy

Optional field name to sort by.

public string? SortBy { get; init; }

Property Value

string

SortDirection

Optional sort direction (asc or desc).

public string? SortDirection { get; init; }

Property Value

string

TransferMode

Optional transfer mode (delta or full). When delta, the server sends the full snapshot on the first emission and only the change set on subsequent ones. When full, the server always sends the complete snapshot without a change set. Defaults to legacy behavior (snapshot plus change set) when omitted.

public string? TransferMode { get; init; }

Property Value

string

Methods

Deconstruct(out string, out IDictionary<string, string?>?, out int?, out int?, out string?, out string?, out string?)

public void Deconstruct(out string QueryName, out IDictionary<string, string?>? Arguments, out int? Page, out int? PageSize, out string? SortBy, out string? SortDirection, out string? TransferMode)

Parameters

QueryName string
Arguments IDictionary<string, string>
Page int?
PageSize int?
SortBy string
SortDirection string
TransferMode string

Equals(ObservableQuerySubscriptionRequest?)

public virtual bool Equals(ObservableQuerySubscriptionRequest? other)

Parameters

other ObservableQuerySubscriptionRequest

Returns

bool

Equals(object?)

public override bool Equals(object? obj)

Parameters

obj object

Returns

bool

GetHashCode()

public override int GetHashCode()

Returns

int

PrintMembers(StringBuilder)

protected virtual bool PrintMembers(StringBuilder builder)

Parameters

builder StringBuilder

Returns

bool

ToString()

public override string ToString()

Returns

string

Operators

operator ==(ObservableQuerySubscriptionRequest?, ObservableQuerySubscriptionRequest?)

public static bool operator ==(ObservableQuerySubscriptionRequest? left, ObservableQuerySubscriptionRequest? right)

Parameters

left ObservableQuerySubscriptionRequest
right ObservableQuerySubscriptionRequest

Returns

bool

operator !=(ObservableQuerySubscriptionRequest?, ObservableQuerySubscriptionRequest?)

public static bool operator !=(ObservableQuerySubscriptionRequest? left, ObservableQuerySubscriptionRequest? right)

Parameters

left ObservableQuerySubscriptionRequest
right ObservableQuerySubscriptionRequest

Returns

bool