Class ComparableFilterBase<T>
- Namespace
- Magicalizer.Filters.Abstractions
- Assembly
- Magicalizer.Filters.Abstractions.dll
Base of the filters of value properties that are ordered (e.g. IntegerFilter): the null, equality, range and list conditions. Only the conditions that are set are applied.
public abstract class ComparableFilterBase<T> : EquatableFilterBase<T>, IFilter where T : struct, IComparable<T>
Type Parameters
TValue type.
- Inheritance
-
ComparableFilterBase<T>
- Implements
- Derived
- Inherited Members
Constructors
ComparableFilterBase(bool?, T?, T?, T?, T?, IEnumerable<T>?, IEnumerable<T>?)
Creates a filter with the given conditions.
protected ComparableFilterBase(bool? isNull = null, T? equals = null, T? notEquals = null, T? from = null, T? to = null, IEnumerable<T>? @in = null, IEnumerable<T>? notIn = null)
Parameters
isNullbool?Matches null values if
true, non-null ones iffalse.equalsT?Matches values equal to this one.
notEqualsT?Matches values not equal to this one.
fromT?Matches values greater than or equal to this one.
toT?Matches values less than or equal to this one.
inIEnumerable<T>Matches values equal to any of these (the query parameter is repeated, e.g. "id.in=1&id.in=2").
notInIEnumerable<T>Matches values not equal to any of these (the query parameter is repeated, e.g. "id.notin=1&id.notin=2").
Properties
From
Matches values greater than or equal to this one.
public T? From { get; set; }
Property Value
- T?
To
Matches values less than or equal to this one.
public T? To { get; set; }
Property Value
- T?