Table of Contents

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

T

Value 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

isNull bool?

Matches null values if true, non-null ones if false.

equals T?

Matches values equal to this one.

notEquals T?

Matches values not equal to this one.

from T?

Matches values greater than or equal to this one.

to T?

Matches values less than or equal to this one.

in IEnumerable<T>

Matches values equal to any of these (the query parameter is repeated, e.g. "id.in=1&id.in=2").

notIn IEnumerable<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?