Show / Hide Table of Contents

Class FilterFactory

Assists in building filters to use with the grids and datasources.

Inheritance
System.Object
FilterFactory
Namespace: IgniteUI.Blazor.Controls
Assembly: IgniteUI.Blazor.dll
Syntax
public class FilterFactory : Object

Constructors

FilterFactory()

Declaration
public FilterFactory()

Properties

Instance

A singleton instance of the factory.

Declaration
public static FilterFactory Instance { get; }
Property Value
Type Description
FilterFactory

TodayOverride

Gets or sets an override for todays date which is used in many date expressions.

Declaration
public DateTime TodayOverride { get; set; }
Property Value
Type Description
System.DateTime

Methods

Add(IgbFilterExpression, IgbFilterExpression)

Creates an Add expression given a left and right expression.

Declaration
public IgbFilterExpression Add(IgbFilterExpression left, IgbFilterExpression right)
Parameters
Type Name Description
IgbFilterExpression left

The left hand side of the expression.

IgbFilterExpression right

The right hand side of the expression.

Returns
Type Description
IgbFilterExpression

The expression.

And(IgbFilterExpression, IgbFilterExpression)

Creates an And expression given a left and right expression.

Declaration
public IgbFilterExpression And(IgbFilterExpression left, IgbFilterExpression right)
Parameters
Type Name Description
IgbFilterExpression left

The left hand side of the expression.

IgbFilterExpression right

The right hand side of the expression.

Returns
Type Description
IgbFilterExpression

The expression.

Build(DataSourceFilterBuilderBuildCallback)

Calls a callback providing a factory for use within the callback.

Declaration
public static IgbFilterExpression Build(DataSourceFilterBuilderBuildCallback callback)
Parameters
Type Name Description
DataSourceFilterBuilderBuildCallback callback

The callback to invoke.

Returns
Type Description
IgbFilterExpression

The filter expression returned from the callback.

Cast(IgbFilterExpression, DataSourceSchemaPropertyType)

Creates a Cast expression.

Declaration
public IgbFilterExpression Cast(IgbFilterExpression expression, DataSourceSchemaPropertyType type)
Parameters
Type Name Description
IgbFilterExpression expression

An expression that resolves to an object to get the Cast of.

DataSourceSchemaPropertyType type

The type to cast to.

Returns
Type Description
IgbFilterExpression

The expression.

Ceiling(IgbFilterExpression)

Creates a Ceiling expression given an expression.

Declaration
public IgbFilterExpression Ceiling(IgbFilterExpression expression)
Parameters
Type Name Description
IgbFilterExpression expression

The expression to apply Ceiling to.

Returns
Type Description
IgbFilterExpression

The expression.

Concat(IgbFilterExpression, IgbFilterExpression)

Creates a Concat expression.

Declaration
public IgbFilterExpression Concat(IgbFilterExpression expression, IgbFilterExpression toAppend)
Parameters
Type Name Description
IgbFilterExpression expression

An expression that resolves to a string.

IgbFilterExpression toAppend

An expression that resolves to a string to concatenate to the first expression.

Returns
Type Description
IgbFilterExpression

The expression.

Concat(IgbFilterExpression, String)

Creates a Concat expression.

Declaration
public IgbFilterExpression Concat(IgbFilterExpression expression, string toAppend)
Parameters
Type Name Description
IgbFilterExpression expression

An expression that resolves to a string.

System.String toAppend

A string to concatenate to the first expression.

Returns
Type Description
IgbFilterExpression

The expression.

Contains(IgbFilterExpression, IgbFilterExpression)

Creates a Contains expression.

Declaration
public IgbFilterExpression Contains(IgbFilterExpression wholeString, IgbFilterExpression subString)
Parameters
Type Name Description
IgbFilterExpression wholeString

An expression that resolves to a string.

IgbFilterExpression subString

An expression that resolves to a string search for in the first expression.

Returns
Type Description
IgbFilterExpression

The expression.

Contains(IgbFilterExpression, String)

Creates a Contains expression.

Declaration
public IgbFilterExpression Contains(IgbFilterExpression wholeString, string subString)
Parameters
Type Name Description
IgbFilterExpression wholeString

An expression that resolves to a string.

System.String subString

A string search for in the first expression.

Returns
Type Description
IgbFilterExpression

The expression.

Date(IgbFilterExpression)

Creates a Date expression.

Declaration
public IgbFilterExpression Date(IgbFilterExpression expression)
Parameters
Type Name Description
IgbFilterExpression expression

An expression that resolves to a datetime to get the Date of.

Returns
Type Description
IgbFilterExpression

The expression.

Day(IgbFilterExpression)

Creates a Day expression.

Declaration
public IgbFilterExpression Day(IgbFilterExpression expression)
Parameters
Type Name Description
IgbFilterExpression expression

An expression which resolves to a date to extract the day from.

Returns
Type Description
IgbFilterExpression

The expression.

Divide(IgbFilterExpression, IgbFilterExpression)

Creates a Divide expression given a left and right expression.

Declaration
public IgbFilterExpression Divide(IgbFilterExpression left, IgbFilterExpression right)
Parameters
Type Name Description
IgbFilterExpression left

The left hand side of the expression.

IgbFilterExpression right

The right hand side of the expression.

Returns
Type Description
IgbFilterExpression

The expression.

EndsWith(IgbFilterExpression, IgbFilterExpression)

Creates an EndsWith expression.

Declaration
public IgbFilterExpression EndsWith(IgbFilterExpression wholeString, IgbFilterExpression subString)
Parameters
Type Name Description
IgbFilterExpression wholeString

An expression that resolves to a string.

IgbFilterExpression subString

An expression that resolves to a string search for at the end of the first expression.

Returns
Type Description
IgbFilterExpression

The expression.

EndsWith(IgbFilterExpression, String)

Creates a EndsWith expression.

Declaration
public IgbFilterExpression EndsWith(IgbFilterExpression wholeString, string subString)
Parameters
Type Name Description
IgbFilterExpression wholeString

An expression that resolves to a string.

System.String subString

A string search for at the end of the first expression.

Returns
Type Description
IgbFilterExpression

The expression.

Equal(IgbFilterExpression, IgbFilterExpression)

Creates an Equal expression given a left and right expression.

Declaration
public IgbFilterExpression Equal(IgbFilterExpression left, IgbFilterExpression right)
Parameters
Type Name Description
IgbFilterExpression left

The left hand side of the expression.

IgbFilterExpression right

The right hand side of the expression.

Returns
Type Description
IgbFilterExpression

The expression.

Floor(IgbFilterExpression)

Creates a Floor expression.

Declaration
public IgbFilterExpression Floor(IgbFilterExpression expression)
Parameters
Type Name Description
IgbFilterExpression expression

An expression that resolves to a number to get the Floor of.

Returns
Type Description
IgbFilterExpression

The expression.

GreaterThan(IgbFilterExpression, IgbFilterExpression)

Creates a Greater Than expression given a left and right expression.

Declaration
public IgbFilterExpression GreaterThan(IgbFilterExpression left, IgbFilterExpression right)
Parameters
Type Name Description
IgbFilterExpression left

The left hand side of the expression.

IgbFilterExpression right

The right hand side of the expression.

Returns
Type Description
IgbFilterExpression

The expression.

GreaterThanOrEqual(IgbFilterExpression, IgbFilterExpression)

Creates a Greater Than Or Equal expression given a left and right expression.

Declaration
public IgbFilterExpression GreaterThanOrEqual(IgbFilterExpression left, IgbFilterExpression right)
Parameters
Type Name Description
IgbFilterExpression left

The left hand side of the expression.

IgbFilterExpression right

The right hand side of the expression.

Returns
Type Description
IgbFilterExpression

The expression.

Group(IgbFilterExpression)

Creates a grouping expression.

Declaration
public IgbFilterExpression Group(IgbFilterExpression expression)
Parameters
Type Name Description
IgbFilterExpression expression

The expression to put in a group.

Returns
Type Description
IgbFilterExpression

The expression.

Hour(IgbFilterExpression)

Creates an Hour expression.

Declaration
public IgbFilterExpression Hour(IgbFilterExpression expression)
Parameters
Type Name Description
IgbFilterExpression expression

An expression that resolves to a datetime to get the Hour of.

Returns
Type Description
IgbFilterExpression

The expression.

IndexOf(IgbFilterExpression, IgbFilterExpression)

Creates an IndexOf expression.

Declaration
public IgbFilterExpression IndexOf(IgbFilterExpression target, IgbFilterExpression toFind)
Parameters
Type Name Description
IgbFilterExpression target

An expression that resolves to a string.

IgbFilterExpression toFind

An expression that resolves to a string search for in the first expression.

Returns
Type Description
IgbFilterExpression

The expression.

IndexOf(IgbFilterExpression, String)

Creates an IndexOf expression.

Declaration
public IgbFilterExpression IndexOf(IgbFilterExpression target, string toFind)
Parameters
Type Name Description
IgbFilterExpression target

An expression that resolves to a string.

System.String toFind

A string search for in the first expression.

Returns
Type Description
IgbFilterExpression

The expression.

IsOf(IgbFilterExpression, DataSourceSchemaPropertyType)

Creates an IsOf expression.

Declaration
public IgbFilterExpression IsOf(IgbFilterExpression expression, DataSourceSchemaPropertyType type)
Parameters
Type Name Description
IgbFilterExpression expression

An expression that resolves to an object to get the IsOf of.

DataSourceSchemaPropertyType type

The type to check against.

Returns
Type Description
IgbFilterExpression

The expression.

Length(IgbFilterExpression)

Creates a Length expression.

Declaration
public IgbFilterExpression Length(IgbFilterExpression expression)
Parameters
Type Name Description
IgbFilterExpression expression

An expression that resolves to a string to get the length of.

Returns
Type Description
IgbFilterExpression

The expression.

LessThan(IgbFilterExpression, IgbFilterExpression)

Creates a Less Than expression given a left and right expression.

Declaration
public IgbFilterExpression LessThan(IgbFilterExpression left, IgbFilterExpression right)
Parameters
Type Name Description
IgbFilterExpression left

The left hand side of the expression.

IgbFilterExpression right

The right hand side of the expression.

Returns
Type Description
IgbFilterExpression

The expression.

LessThanOrEqual(IgbFilterExpression, IgbFilterExpression)

Creates a Less Than Or Equal expression given a left and right expression.

Declaration
public IgbFilterExpression LessThanOrEqual(IgbFilterExpression left, IgbFilterExpression right)
Parameters
Type Name Description
IgbFilterExpression left

The left hand side of the expression.

IgbFilterExpression right

The right hand side of the expression.

Returns
Type Description
IgbFilterExpression

The expression.

Literal(Object)

Creates a literal value expression.

Declaration
public IgbFilterExpression Literal(object value)
Parameters
Type Name Description
System.Object value

The literal value to use.

Returns
Type Description
IgbFilterExpression

The expression.

Minute(IgbFilterExpression)

Creates a Minute expression.

Declaration
public IgbFilterExpression Minute(IgbFilterExpression expression)
Parameters
Type Name Description
IgbFilterExpression expression

An expression that resolves to a datetime to get the Minute of.

Returns
Type Description
IgbFilterExpression

The expression.

Modulus(IgbFilterExpression, IgbFilterExpression)

Creates a Modulus expression given a left and right expression.

Declaration
public IgbFilterExpression Modulus(IgbFilterExpression left, IgbFilterExpression right)
Parameters
Type Name Description
IgbFilterExpression left

The left hand side of the expression.

IgbFilterExpression right

The right hand side of the expression.

Returns
Type Description
IgbFilterExpression

The expression.

Month(IgbFilterExpression)

Creates a Month expression.

Declaration
public IgbFilterExpression Month(IgbFilterExpression expression)
Parameters
Type Name Description
IgbFilterExpression expression

An expression that resolves to a datetime to get the Month of.

Returns
Type Description
IgbFilterExpression

The expression.

Multiply(IgbFilterExpression, IgbFilterExpression)

Creates a Multiply expression given a left and right expression.

Declaration
public IgbFilterExpression Multiply(IgbFilterExpression left, IgbFilterExpression right)
Parameters
Type Name Description
IgbFilterExpression left

The left hand side of the expression.

IgbFilterExpression right

The right hand side of the expression.

Returns
Type Description
IgbFilterExpression

The expression.

Not(IgbFilterExpression)

Creates an Not expression given an expression.

Declaration
public IgbFilterExpression Not(IgbFilterExpression expression)
Parameters
Type Name Description
IgbFilterExpression expression

The expression to create the Not expression for.

Returns
Type Description
IgbFilterExpression

The expression.

NotEqual(IgbFilterExpression, IgbFilterExpression)

Creates a Not Equal expression given a left and right expression.

Declaration
public IgbFilterExpression NotEqual(IgbFilterExpression left, IgbFilterExpression right)
Parameters
Type Name Description
IgbFilterExpression left

The left hand side of the expression.

IgbFilterExpression right

The right hand side of the expression.

Returns
Type Description
IgbFilterExpression

The expression.

Now()

Creates a Now expression which returns the current date/time.

Declaration
public IgbFilterExpression Now()
Returns
Type Description
IgbFilterExpression

The expression.

Or(IgbFilterExpression, IgbFilterExpression)

Creates an Or expression given a left and right expression.

Declaration
public IgbFilterExpression Or(IgbFilterExpression left, IgbFilterExpression right)
Parameters
Type Name Description
IgbFilterExpression left

The left hand side of the expression.

IgbFilterExpression right

The right hand side of the expression.

Returns
Type Description
IgbFilterExpression

The expression.

Property(String)

Creates a property access expression.

Declaration
public IgbFilterExpression Property(string propertyName)
Parameters
Type Name Description
System.String propertyName

The property name to access.

Returns
Type Description
IgbFilterExpression

The expression.

Replace(IgbFilterExpression, IgbFilterExpression, IgbFilterExpression)

Creates a Replace expression.

Declaration
public IgbFilterExpression Replace(IgbFilterExpression target, IgbFilterExpression toFind, IgbFilterExpression replacement)
Parameters
Type Name Description
IgbFilterExpression target

An expression that resolves to a string.

IgbFilterExpression toFind

An expression that resolves to a string search for in the first expression.

IgbFilterExpression replacement

An expression that resolves to a string to replace for toFind in the first expression.

Returns
Type Description
IgbFilterExpression

The expression.

Replace(IgbFilterExpression, IgbFilterExpression, String)

Creates a Replace expression.

Declaration
public IgbFilterExpression Replace(IgbFilterExpression target, IgbFilterExpression toFind, string replacement)
Parameters
Type Name Description
IgbFilterExpression target

An expression that resolves to a string.

IgbFilterExpression toFind

An expression that resolves to a string search for in the first expression.

System.String replacement

A string to substitute for toFind in target.

Returns
Type Description
IgbFilterExpression

The expression.

Replace(IgbFilterExpression, String, IgbFilterExpression)

Creates a Replace expression.

Declaration
public IgbFilterExpression Replace(IgbFilterExpression target, string toFind, IgbFilterExpression replacement)
Parameters
Type Name Description
IgbFilterExpression target

An expression that resolves to a string.

System.String toFind

A string search for in the first expression.

IgbFilterExpression replacement

An expression that resolves to a string to substitute for toFind in target.

Returns
Type Description
IgbFilterExpression

The expression.

Replace(IgbFilterExpression, String, String)

Creates a Replace expression.

Declaration
public IgbFilterExpression Replace(IgbFilterExpression target, string toFind, string replacement)
Parameters
Type Name Description
IgbFilterExpression target

An expression that resolves to a string.

System.String toFind

A string search for in the first expression.

System.String replacement

A string to substitute for toFind in target.

Returns
Type Description
IgbFilterExpression

The expression.

Round(IgbFilterExpression)

Creates a Round expression.

Declaration
public IgbFilterExpression Round(IgbFilterExpression expression)
Parameters
Type Name Description
IgbFilterExpression expression

An expression that resolves to a number to round.

Returns
Type Description
IgbFilterExpression

The expression.

Second(IgbFilterExpression)

Creates a Second expression.

Declaration
public IgbFilterExpression Second(IgbFilterExpression expression)
Parameters
Type Name Description
IgbFilterExpression expression

An expression that resolves to a datetime to get the Second of.

Returns
Type Description
IgbFilterExpression

The expression.

StartsWith(IgbFilterExpression, IgbFilterExpression)

Creates a StartsWith expression.

Declaration
public IgbFilterExpression StartsWith(IgbFilterExpression wholeString, IgbFilterExpression subString)
Parameters
Type Name Description
IgbFilterExpression wholeString

An expression that resolves to a string.

IgbFilterExpression subString

An expression that resolves to a string search for at the start of wholeString.

Returns
Type Description
IgbFilterExpression

The expression.

StartsWith(IgbFilterExpression, String)

Creates an StartsWith expression.

Declaration
public IgbFilterExpression StartsWith(IgbFilterExpression wholeString, string subString)
Parameters
Type Name Description
IgbFilterExpression wholeString

An expression that resolves to a string.

System.String subString

A string search for at the start of wholeString.

Returns
Type Description
IgbFilterExpression

The expression.

Substring(IgbFilterExpression, IgbFilterExpression)

Creates an StartsWith expression.

Declaration
public IgbFilterExpression Substring(IgbFilterExpression wholeString, IgbFilterExpression startIndex)
Parameters
Type Name Description
IgbFilterExpression wholeString

An expression that resolves to a string.

IgbFilterExpression startIndex

An expression that resolves to an integer for where to start the substring.

Returns
Type Description
IgbFilterExpression

The expression.

Substring(IgbFilterExpression, IgbFilterExpression, IgbFilterExpression)

Creates an StartsWith expression.

Declaration
public IgbFilterExpression Substring(IgbFilterExpression expression, IgbFilterExpression startIndex, IgbFilterExpression length)
Parameters
Type Name Description
IgbFilterExpression expression

An expression that resolves to a string.

IgbFilterExpression startIndex

An expression that resolves to an integer for where to start the substring.

IgbFilterExpression length

An expression that resolves to an integer how long the substring should be.

Returns
Type Description
IgbFilterExpression

The expression.

Substring(IgbFilterExpression, IgbFilterExpression, Int32)

Creates an StartsWith expression.

Declaration
public IgbFilterExpression Substring(IgbFilterExpression expression, IgbFilterExpression startIndex, int length)
Parameters
Type Name Description
IgbFilterExpression expression

An expression that resolves to a string.

IgbFilterExpression startIndex

An expression that resolves to an integer for where to start the substring.

System.Int32 length

An integer how long the substring should be.

Returns
Type Description
IgbFilterExpression

The expression.

Substring(IgbFilterExpression, Int32)

Creates an StartsWith expression.

Declaration
public IgbFilterExpression Substring(IgbFilterExpression wholeString, int startIndex)
Parameters
Type Name Description
IgbFilterExpression wholeString

An expression that resolves to a string.

System.Int32 startIndex

An integer for where to start the substring.

Returns
Type Description
IgbFilterExpression

The expression.

Substring(IgbFilterExpression, Int32, IgbFilterExpression)

Creates an StartsWith expression.

Declaration
public IgbFilterExpression Substring(IgbFilterExpression expression, int startIndex, IgbFilterExpression length)
Parameters
Type Name Description
IgbFilterExpression expression

An expression that resolves to a string.

System.Int32 startIndex

An integer for where to start the substring.

IgbFilterExpression length

An expression that resolves to an integer how long the substring should be.

Returns
Type Description
IgbFilterExpression

The expression.

Substring(IgbFilterExpression, Int32, Int32)

Creates an StartsWith expression.

Declaration
public IgbFilterExpression Substring(IgbFilterExpression expression, int startIndex, int length)
Parameters
Type Name Description
IgbFilterExpression expression

An expression that resolves to a string.

System.Int32 startIndex

An integer for where to start the substring.

System.Int32 length

An integer how long the substring should be.

Returns
Type Description
IgbFilterExpression

The expression.

Subtract(IgbFilterExpression, IgbFilterExpression)

Creates a Subtract expression given a left and right expression.

Declaration
public IgbFilterExpression Subtract(IgbFilterExpression left, IgbFilterExpression right)
Parameters
Type Name Description
IgbFilterExpression left

The left hand side of the expression.

IgbFilterExpression right

The right hand side of the expression.

Returns
Type Description
IgbFilterExpression

The expression.

Time(IgbFilterExpression)

Creates a Time expression.

Declaration
public IgbFilterExpression Time(IgbFilterExpression expression)
Parameters
Type Name Description
IgbFilterExpression expression

An expression that resolves to a datetime to get the Time of.

Returns
Type Description
IgbFilterExpression

The expression.

ToLower(IgbFilterExpression)

Creates a ToLower expression.

Declaration
public IgbFilterExpression ToLower(IgbFilterExpression expression)
Parameters
Type Name Description
IgbFilterExpression expression

An expression that resolves to a string to get the ToLower of.

Returns
Type Description
IgbFilterExpression

The expression.

ToUpper(IgbFilterExpression)

Creates a ToUpper expression.

Declaration
public IgbFilterExpression ToUpper(IgbFilterExpression expression)
Parameters
Type Name Description
IgbFilterExpression expression

An expression that resolves to a string to get the ToUpper of.

Returns
Type Description
IgbFilterExpression

The expression.

Trim(IgbFilterExpression)

Creates a Trim expression.

Declaration
public IgbFilterExpression Trim(IgbFilterExpression expression)
Parameters
Type Name Description
IgbFilterExpression expression

An expression that resolves to a string to get the Trim of.

Returns
Type Description
IgbFilterExpression

The expression.

Year(IgbFilterExpression)

Creates a Year expression.

Declaration
public IgbFilterExpression Year(IgbFilterExpression expression)
Parameters
Type Name Description
IgbFilterExpression expression

An expression that resolves to a datetime to get the Year of.

Returns
Type Description
IgbFilterExpression

The expression.