public sealed class RunicFilter One filter of a RunicQuery. Values are JSON, as the page sends them.
Properties
Field
public string Field { get; } The field the filter applies to, or the name of a RunicFilterOperator.Custom filter.
Maximum
public JsonElement Maximum { get; } The inclusive upper bound of a range, or JsonValueKind.Undefined for none.
Minimum
public JsonElement Minimum { get; } The inclusive lower bound of a range, or JsonValueKind.Undefined for none.
Value
public JsonElement Value { get; } The value of an RunicFilterOperator.Equal, RunicFilterOperator.Contains or RunicFilterOperator.Custom filter. JsonValueKind.Undefined when it has none.
Methods
Contains
public static RunicFilter Contains(string field, string text) A filter that keeps rows whose text field contains text.
Parameters
fieldThe field.
textThe text to find.
Custom
public static RunicFilter Custom(string name, JsonElement value = default) A filter that the row source defines, such as "rows I own" or a full-text search.
Parameters
nameThe filter's name.
valueIts JSON argument, or a default
JsonElementfor none.
Equal
public static RunicFilter Equal(string field, JsonElement value) A filter that keeps rows whose field equals value.
Parameters
fieldThe field.
valueThe JSON value, encoded as the field's wire type.
Equal
public static RunicFilter Equal(string field, string? value) A filter that keeps rows whose field equals the string value.
Parameters
fieldThe field.
valueThe string.
Equal
public static RunicFilter Equal(string field, double value) A filter that keeps rows whose field equals the number value.
Parameters
fieldThe field.
valueThe number.
Equal
public static RunicFilter Equal(string field, bool value) A filter that keeps rows whose field equals the Boolean value.
Parameters
fieldThe field.
valueThe Boolean.
Range
public static RunicFilter Range(string field, JsonElement minimum, JsonElement maximum) A filter that keeps rows whose field lies between two inclusive JSON bounds.
Parameters
fieldThe field.
minimumThe lower bound, or a default
JsonElementfor none.maximumThe upper bound, or a default
JsonElementfor none.
Range
public static RunicFilter Range(string field, double? minimum, double? maximum) A filter that keeps rows whose numeric field lies between two inclusive bounds.
Parameters
fieldThe field.
minimumThe lower bound, or
nullfor none.maximumThe upper bound, or
nullfor none.