public sealed class RunicQuery : IEquatable<RunicQuery> The sort and filter of a RunicQueryCollection: portable between the page and .NET, and mapped to LINQ by RunicQueryFields.
Remarks
RunicQuery.Sort orders the rows by its keys in turn; RunicQuery.Filters all apply (a logical AND). Field names are the names the page uses, normally the rows' wire names (label for a Label property). A row source decides which fields it accepts and rejects the others with ArgumentException.
A query is immutable. Two queries are equal when their canonical JSON (RunicQuery.ToString) is equal. The wire form is in specs/application/README.md, "Query collections".
Constructors
RunicQuery
public RunicQuery(IEnumerable<RunicSortKey>? sort = null, IEnumerable<RunicFilter>? filters = null) Creates a query.
Parameters
sortThe sort keys, in order of precedence.
filtersThe filters, which all apply.
Exceptions
ArgumentExceptionA field name is empty or too long, or there are too many keys or filters.
Fields
MaximumFieldLength
public const int MaximumFieldLength = 128 The longest field name, in UTF-16 code units.
MaximumFilters
public const int MaximumFilters = 32 The most filters a query has.
MaximumSortKeys
public const int MaximumSortKeys = 8 The most sort keys a query has.
Properties
Empty
public static RunicQuery Empty { get; } A query without sort keys and filters: the source's own order.
Methods
ToString
public override string ToString() The query's canonical wire JSON.
WithFilters
public RunicQuery WithFilters(params IEnumerable<RunicFilter> filters) Returns a query with this query's sort keys and these filters.
Parameters
filtersThe filters, which all apply.
WithSort
public RunicQuery WithSort(params IEnumerable<RunicSortKey> sort) Returns a query with these sort keys and this query's filters.
Parameters
sortThe sort keys, in order of precedence.