Class FilterExpressionBuilder<TData>

The FilterExpressionBuilder class supports the construction of the expressions which facilitate the querying of social data.

Inheritance
System.Object
FilterExpressionBuilder<TData>
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: EPiServer.Social.Common
Assembly: EPiServer.Social.Common.dll
Version: 1.5.4
Syntax
public static class FilterExpressionBuilder<TData>
Type Parameters
Name Description
TData

Type of the data to be queried

Methods

And(FilterExpression[])

Constructs an AndExpression combining the specified collection of expressions.

Declaration
public static AndExpression And(params FilterExpression[] expressions)
Parameters
Type Name Description
FilterExpression[] expressions

Collection of expressions to be "anded"

Returns
Type Description
AndExpression

AndExpression combining the specified collection of expressions

And(IEnumerable<FilterExpression>)

Constructs an AndExpression combining the specified collection of expressions.

Declaration
public static AndExpression And(IEnumerable<FilterExpression> expressions)
Parameters
Type Name Description
System.Collections.Generic.IEnumerable<FilterExpression> expressions

Collection of expressions to be "anded"

Returns
Type Description
AndExpression

AndExpression combining the specified collection of expressions

Any<TValue>(Expression<Func<TData, TValue>>, IEnumerable<Boolean>)

Constructs an AnyExpression for the identified field and values.

Declaration
public static AnyExpression Any<TValue>(Expression<Func<TData, TValue>> fieldSelector, IEnumerable<bool> values)
Parameters
Type Name Description
System.Linq.Expressions.Expression<System.Func<TData, TValue>> fieldSelector

Selector identifying the data field to be represented in the expression

System.Collections.Generic.IEnumerable<System.Boolean> values

Value to be compared in the expression

Returns
Type Description
AnyExpression

AnyExpression for the identified field and value

Type Parameters
Name Description
TValue

Data type of the field targeted by the field selector

Any<TValue>(Expression<Func<TData, TValue>>, IEnumerable<DateTime>)

Constructs an AnyExpression for the identified field and values.

Declaration
public static AnyExpression Any<TValue>(Expression<Func<TData, TValue>> fieldSelector, IEnumerable<DateTime> values)
Parameters
Type Name Description
System.Linq.Expressions.Expression<System.Func<TData, TValue>> fieldSelector

Selector identifying the data field to be represented in the expression

System.Collections.Generic.IEnumerable<System.DateTime> values

Value to be compared in the expression

Returns
Type Description
AnyExpression

AnyExpression for the identified field and value

Type Parameters
Name Description
TValue

Data type of the field targeted by the field selector

Any<TValue>(Expression<Func<TData, TValue>>, IEnumerable<Double>)

Constructs an AnyExpression for the identified field and values.

Declaration
public static AnyExpression Any<TValue>(Expression<Func<TData, TValue>> fieldSelector, IEnumerable<double> values)
Parameters
Type Name Description
System.Linq.Expressions.Expression<System.Func<TData, TValue>> fieldSelector

Selector identifying the data field to be represented in the expression

System.Collections.Generic.IEnumerable<System.Double> values

Value to be compared in the expression

Returns
Type Description
AnyExpression

AnyExpression for the identified field and value

Type Parameters
Name Description
TValue

Data type of the field targeted by the field selector

Any<TValue>(Expression<Func<TData, TValue>>, IEnumerable<Int64>)

Constructs an AnyExpression for the identified field and values.

Declaration
public static AnyExpression Any<TValue>(Expression<Func<TData, TValue>> fieldSelector, IEnumerable<long> values)
Parameters
Type Name Description
System.Linq.Expressions.Expression<System.Func<TData, TValue>> fieldSelector

Selector identifying the data field to be represented in the expression

System.Collections.Generic.IEnumerable<System.Int64> values

Value to be compared in the expression

Returns
Type Description
AnyExpression

AnyExpression for the identified field and value

Type Parameters
Name Description
TValue

Data type of the field targeted by the field selector

Any<TValue>(Expression<Func<TData, TValue>>, IEnumerable<String>)

Constructs an AnyExpression for the identified field and values.

Declaration
public static AnyExpression Any<TValue>(Expression<Func<TData, TValue>> fieldSelector, IEnumerable<string> values)
Parameters
Type Name Description
System.Linq.Expressions.Expression<System.Func<TData, TValue>> fieldSelector

Selector identifying the data field to be represented in the expression

System.Collections.Generic.IEnumerable<System.String> values

Value to be compared in the expression

Returns
Type Description
AnyExpression

AnyExpression for the identified field and value

Type Parameters
Name Description
TValue

Data type of the field targeted by the field selector

Contains<TValue>(Expression<Func<TData, TValue>>, Boolean)

Constructs an ContainsExpression for the identified field and value.

Declaration
public static ContainsExpression Contains<TValue>(Expression<Func<TData, TValue>> fieldSelector, bool value)
Parameters
Type Name Description
System.Linq.Expressions.Expression<System.Func<TData, TValue>> fieldSelector

Selector identifying the data field to be represented in the expression

System.Boolean value

Value to be compared in the expression

Returns
Type Description
ContainsExpression

ContainsExpression for the identified field and value

Type Parameters
Name Description
TValue

Data type of the field targeted by the field selector

Contains<TValue>(Expression<Func<TData, TValue>>, DateTime)

Constructs an ContainsExpression for the identified field and value.

Declaration
public static ContainsExpression Contains<TValue>(Expression<Func<TData, TValue>> fieldSelector, DateTime value)
Parameters
Type Name Description
System.Linq.Expressions.Expression<System.Func<TData, TValue>> fieldSelector

Selector identifying the data field to be represented in the expression

System.DateTime value

Value to be compared in the expression

Returns
Type Description
ContainsExpression

ContainsExpression for the identified field and value

Type Parameters
Name Description
TValue

Data type of the field targeted by the field selector

Contains<TValue>(Expression<Func<TData, TValue>>, Double)

Constructs an ContainsExpression for the identified field and value.

Declaration
public static ContainsExpression Contains<TValue>(Expression<Func<TData, TValue>> fieldSelector, double value)
Parameters
Type Name Description
System.Linq.Expressions.Expression<System.Func<TData, TValue>> fieldSelector

Selector identifying the data field to be represented in the expression

System.Double value

Value to be compared in the expression

Returns
Type Description
ContainsExpression

ContainsExpression for the identified field and value

Type Parameters
Name Description
TValue

Data type of the field targeted by the field selector

Contains<TValue>(Expression<Func<TData, TValue>>, Int64)

Constructs an ContainsExpression for the identified field and value.

Declaration
public static ContainsExpression Contains<TValue>(Expression<Func<TData, TValue>> fieldSelector, long value)
Parameters
Type Name Description
System.Linq.Expressions.Expression<System.Func<TData, TValue>> fieldSelector

Selector identifying the data field to be represented in the expression

System.Int64 value

Value to be compared in the expression

Returns
Type Description
ContainsExpression

ContainsExpression for the identified field and value

Type Parameters
Name Description
TValue

Data type of the field targeted by the field selector

Contains<TValue>(Expression<Func<TData, TValue>>, String)

Constructs an ContainsExpression for the identified field and value.

Declaration
public static ContainsExpression Contains<TValue>(Expression<Func<TData, TValue>> fieldSelector, string value)
Parameters
Type Name Description
System.Linq.Expressions.Expression<System.Func<TData, TValue>> fieldSelector

Selector identifying the data field to be represented in the expression

System.String value

Value to be compared in the expression

Returns
Type Description
ContainsExpression

ContainsExpression for the identified field and value

Type Parameters
Name Description
TValue

Data type of the field targeted by the field selector

EqualTo<TValue>(Expression<Func<TData, TValue>>, Boolean)

Constructs an EqualToExpression for the identified field and value.

Declaration
public static EqualToExpression EqualTo<TValue>(Expression<Func<TData, TValue>> fieldSelector, bool value)
Parameters
Type Name Description
System.Linq.Expressions.Expression<System.Func<TData, TValue>> fieldSelector

Selector identifying the data field to be represented in the expression

System.Boolean value

Value to be compared in the expression

Returns
Type Description
EqualToExpression

EqualToExpression for the identified field and value

Type Parameters
Name Description
TValue

Data type of the field targeted by the field selector

EqualTo<TValue>(Expression<Func<TData, TValue>>, DateTime)

Constructs an EqualToExpression for the identified field and value.

Declaration
public static EqualToExpression EqualTo<TValue>(Expression<Func<TData, TValue>> fieldSelector, DateTime value)
Parameters
Type Name Description
System.Linq.Expressions.Expression<System.Func<TData, TValue>> fieldSelector

Selector identifying the data field to be represented in the expression

System.DateTime value

Value to be compared in the expression

Returns
Type Description
EqualToExpression

EqualToExpression for the identified field and value

Type Parameters
Name Description
TValue

Data type of the field targeted by the field selector

EqualTo<TValue>(Expression<Func<TData, TValue>>, Int64)

Constructs an EqualToExpression for the identified field and value.

Declaration
public static EqualToExpression EqualTo<TValue>(Expression<Func<TData, TValue>> fieldSelector, long value)
Parameters
Type Name Description
System.Linq.Expressions.Expression<System.Func<TData, TValue>> fieldSelector

Selector identifying the data field to be represented in the expression

System.Int64 value

Value to be compared in the expression

Returns
Type Description
EqualToExpression

EqualToExpression for the identified field and value

Type Parameters
Name Description
TValue

Data type of the field targeted by the field selector

EqualTo<TValue>(Expression<Func<TData, TValue>>, String)

Constructs an EqualToExpression for the identified field and value.

Declaration
public static EqualToExpression EqualTo<TValue>(Expression<Func<TData, TValue>> fieldSelector, string value)
Parameters
Type Name Description
System.Linq.Expressions.Expression<System.Func<TData, TValue>> fieldSelector

Selector identifying the data field to be represented in the expression

System.String value

Value to be compared in the expression

Returns
Type Description
EqualToExpression

EqualToExpression for the identified field and value

Type Parameters
Name Description
TValue

Data type of the field targeted by the field selector

Field<TValue>(Expression<Func<TData, TValue>>)

Constructs a FieldExpression representing the field identified by the specified field selector.

Declaration
public static FieldExpression Field<TValue>(Expression<Func<TData, TValue>> fieldSelector)
Parameters
Type Name Description
System.Linq.Expressions.Expression<System.Func<TData, TValue>> fieldSelector

Selector identifying the data field to be represented as an expression

Returns
Type Description
FieldExpression

FieldExpression representing the selected data field

Type Parameters
Name Description
TValue

Data type of the field targeted by the field selector

GreaterThan<TValue>(Expression<Func<TData, TValue>>, DateTime)

Constructs an GreaterThanExpression for the identified field and value.

Declaration
public static GreaterThanExpression GreaterThan<TValue>(Expression<Func<TData, TValue>> fieldSelector, DateTime value)
Parameters
Type Name Description
System.Linq.Expressions.Expression<System.Func<TData, TValue>> fieldSelector

Selector identifying the data field to be represented in the expression

System.DateTime value

Value to be compared in the expression

Returns
Type Description
GreaterThanExpression

GreaterThanExpression for the identified field and value

Type Parameters
Name Description
TValue

Data type of the field targeted by the field selector

GreaterThan<TValue>(Expression<Func<TData, TValue>>, Int64)

Constructs an GreaterThanExpression for the identified field and value.

Declaration
public static GreaterThanExpression GreaterThan<TValue>(Expression<Func<TData, TValue>> fieldSelector, long value)
Parameters
Type Name Description
System.Linq.Expressions.Expression<System.Func<TData, TValue>> fieldSelector

Selector identifying the data field to be represented in the expression

System.Int64 value

Value to be compared in the expression

Returns
Type Description
GreaterThanExpression

GreaterThanExpression for the identified field and value

Type Parameters
Name Description
TValue

Data type of the field targeted by the field selector

GreaterThanOrEqualTo<TValue>(Expression<Func<TData, TValue>>, DateTime)

Constructs an GreaterThanOrEqualTo for the identified field and value.

Declaration
public static GreaterThanOrEqualToExpression GreaterThanOrEqualTo<TValue>(Expression<Func<TData, TValue>> fieldSelector, DateTime value)
Parameters
Type Name Description
System.Linq.Expressions.Expression<System.Func<TData, TValue>> fieldSelector

Selector identifying the data field to be represented in the expression

System.DateTime value

Value to be compared in the expression

Returns
Type Description
GreaterThanOrEqualToExpression

GreaterThanOrEqualTo for the identified field and value

Type Parameters
Name Description
TValue

Data type of the field targeted by the field selector

GreaterThanOrEqualTo<TValue>(Expression<Func<TData, TValue>>, Int64)

Constructs an GreaterThanOrEqualTo for the identified field and value.

Declaration
public static GreaterThanOrEqualToExpression GreaterThanOrEqualTo<TValue>(Expression<Func<TData, TValue>> fieldSelector, long value)
Parameters
Type Name Description
System.Linq.Expressions.Expression<System.Func<TData, TValue>> fieldSelector

Selector identifying the data field to be represented in the expression

System.Int64 value

Value to be compared in the expression

Returns
Type Description
GreaterThanOrEqualToExpression

GreaterThanOrEqualTo for the identified field and value

Type Parameters
Name Description
TValue

Data type of the field targeted by the field selector

LessThan<TValue>(Expression<Func<TData, TValue>>, DateTime)

Constructs an LessThan for the identified field and value.

Declaration
public static LessThanExpression LessThan<TValue>(Expression<Func<TData, TValue>> fieldSelector, DateTime value)
Parameters
Type Name Description
System.Linq.Expressions.Expression<System.Func<TData, TValue>> fieldSelector

Selector identifying the data field to be represented in the expression

System.DateTime value

Value to be compared in the expression

Returns
Type Description
LessThanExpression

LessThan for the identified field and value

Type Parameters
Name Description
TValue

Data type of the field targeted by the field selector

LessThan<TValue>(Expression<Func<TData, TValue>>, Int64)

Constructs an LessThan for the identified field and value.

Declaration
public static LessThanExpression LessThan<TValue>(Expression<Func<TData, TValue>> fieldSelector, long value)
Parameters
Type Name Description
System.Linq.Expressions.Expression<System.Func<TData, TValue>> fieldSelector

Selector identifying the data field to be represented in the expression

System.Int64 value

Value to be compared in the expression

Returns
Type Description
LessThanExpression

LessThan for the identified field and value

Type Parameters
Name Description
TValue

Data type of the field targeted by the field selector

LessThanOrEqualTo<TValue>(Expression<Func<TData, TValue>>, DateTime)

Constructs an LessThanOrEqualToExpression for the identified field and value.

Declaration
public static LessThanOrEqualToExpression LessThanOrEqualTo<TValue>(Expression<Func<TData, TValue>> fieldSelector, DateTime value)
Parameters
Type Name Description
System.Linq.Expressions.Expression<System.Func<TData, TValue>> fieldSelector

Selector identifying the data field to be represented in the expression

System.DateTime value

Value to be compared in the expression

Returns
Type Description
LessThanOrEqualToExpression

LessThanOrEqualToExpression for the identified field and value

Type Parameters
Name Description
TValue

Data type of the field targeted by the field selector

LessThanOrEqualTo<TValue>(Expression<Func<TData, TValue>>, Int64)

Constructs an LessThanOrEqualToExpression for the identified field and value.

Declaration
public static LessThanOrEqualToExpression LessThanOrEqualTo<TValue>(Expression<Func<TData, TValue>> fieldSelector, long value)
Parameters
Type Name Description
System.Linq.Expressions.Expression<System.Func<TData, TValue>> fieldSelector

Selector identifying the data field to be represented in the expression

System.Int64 value

Value to be compared in the expression

Returns
Type Description
LessThanOrEqualToExpression

LessThanOrEqualToExpression for the identified field and value

Type Parameters
Name Description
TValue

Data type of the field targeted by the field selector

Or(FilterExpression[])

Constructs an OrExpression combining the specified collection of expressions.

Declaration
public static OrExpression Or(params FilterExpression[] expressions)
Parameters
Type Name Description
FilterExpression[] expressions

Collection of expressions to be "ored"

Returns
Type Description
OrExpression

OrExpression combining the specified collection of expressions

Or(IEnumerable<FilterExpression>)

Constructs an OrExpression combining the specified collection of expressions.

Declaration
public static OrExpression Or(IEnumerable<FilterExpression> expressions)
Parameters
Type Name Description
System.Collections.Generic.IEnumerable<FilterExpression> expressions

Collection of expressions to be "ored"

Returns
Type Description
OrExpression

OrExpression combining the specified collection of expressions

arrow_upward