Skip to main content

FieldFilterCriteriaExtensions

Namespace: Meshmakers.Octo.Runtime.Contracts.Repositories.Query

Extension methods to work fluently with field filter criteria

public static class FieldFilterCriteriaExtensions

Inheritance ObjectFieldFilterCriteriaExtensions

Methods

FieldFilter<T>(T, String, FieldFilterOperator, Object)

Adds a field filter to the query.

public static T FieldFilter<T>(T this, string attributePath, FieldFilterOperator comparisonOperator, object comparisonValue)

Type Parameters

T

Parameters

this T
The field filter collection

attributePath String
Path of attribute

comparisonOperator FieldFilterOperator
Operator of attribute

comparisonValue Object
Comparison value of the field filter

Returns

T

FieldEquals<T>(T, String, Object)

Adds a field filter that checks if the value of an attribute is equal to the given value.

public static T FieldEquals<T>(T this, string attributePath, object comparisonValue)

Type Parameters

T

Parameters

this T
The field filter collection

attributePath String
Path of attribute

comparisonValue Object
Comparison value of the field filter

Returns

T

FieldNotEquals<T>(T, String, Object)

Adds a field filter that checks if the value of an attribute is not equal to the given value.

public static T FieldNotEquals<T>(T this, string attributePath, object comparisonValue)

Type Parameters

T

Parameters

this T
The field filter collection

attributePath String
Path of attribute

comparisonValue Object
Comparison value of the field filter

Returns

T

FieldGreaterThan<T>(T, String, Object)

Adds a field filter that checks if the value of an attribute is greater than to the given value.

public static T FieldGreaterThan<T>(T this, string attributePath, object comparisonValue)

Type Parameters

T

Parameters

this T
The field filter collection

attributePath String
Path of attribute

comparisonValue Object
Comparison value of the field filter

Returns

T

FieldGreaterEqualThan<T>(T, String, Object)

Adds a field filter that checks if the value of an attribute is greater or equals to the given value.

public static T FieldGreaterEqualThan<T>(T this, string attributePath, object comparisonValue)

Type Parameters

T

Parameters

this T
The field filter collection

attributePath String
Path of attribute

comparisonValue Object
Comparison value of the field filter

Returns

T

FieldLessThan<T>(T, String, Object)

Adds a field filter that checks if the value of an attribute is less than the given value.

public static T FieldLessThan<T>(T this, string attributePath, object comparisonValue)

Type Parameters

T

Parameters

this T
The field filter collection

attributePath String
Path of attribute

comparisonValue Object
Comparison value of the field filter

Returns

T

FieldLessEqualThan<T>(T, String, Object)

Adds a field filter that checks if the value of an attribute is less or equals to the given value.

public static T FieldLessEqualThan<T>(T this, string attributePath, object comparisonValue)

Type Parameters

T

Parameters

this T
The field filter collection

attributePath String
Path of attribute

comparisonValue Object
Comparison value of the field filter

Returns

T

FieldIn<T>(T, String, Object)

Adds a field filter that checks if the value of an attribute is in the given value.

public static T FieldIn<T>(T this, string attributePath, object comparisonValue)

Type Parameters

T

Parameters

this T
The field filter collection

attributePath String
Path of attribute

comparisonValue Object
Comparison value of the field filter

Returns

T

FieldNotIn<T>(T, String, Object)

Adds a field filter that checks if the value of an attribute is not in the given value.

public static T FieldNotIn<T>(T this, string attributePath, object comparisonValue)

Type Parameters

T

Parameters

this T
The field filter collection

attributePath String
Path of attribute

comparisonValue Object
Comparison value of the field filter

Returns

T

FieldLike<T>(T, String, Object)

Adds a field filter that checks if the value of an attribute is like in the given value.

public static T FieldLike<T>(T this, string attributePath, object comparisonValue)

Type Parameters

T

Parameters

this T
The field filter collection

attributePath String
Path of attribute

comparisonValue Object
Comparison value of the field filter

Returns

T

FieldMatchRegex<T>(T, String, Object)

Adds a field filter that checks if the value of an attribute matches the given regex expression.

public static T FieldMatchRegex<T>(T this, string attributePath, object comparisonValue)

Type Parameters

T

Parameters

this T
The field filter collection

attributePath String
Path of attribute

comparisonValue Object
Comparison value of the field filter

Returns

T

FieldAnyEq<T>(T, String, Object)

Adds a field filter that checks if any value of an array attribute equals.

public static T FieldAnyEq<T>(T this, string attributePath, object comparisonValue)

Type Parameters

T

Parameters

this T
The field filter collection

attributePath String
Path of attribute

comparisonValue Object
Comparison value of the field filter

Returns

T

FieldAnyLike<T>(T, String, Object)

Adds a field filter that checks if any value of an array attribute is like the given value.

public static T FieldAnyLike<T>(T this, string attributePath, object comparisonValue)

Type Parameters

T

Parameters

this T
The field filter collection

attributePath String
Path of attribute

comparisonValue Object
Comparison value of the field filter

Returns

T

Remarks:

Wildcards are allowed in the comparison value.

MatchField<T>(T, String, FieldFilterCriteria)

Adds a field filter that checks if the value of an attribute match. A new filter collection is returned to describe the match.

public static T MatchField<T>(T this, string attributePath, FieldFilterCriteria fieldFilterCriteria)

Type Parameters

T

Parameters

this T
The field filter collection

attributePath String
Path of attribute

fieldFilterCriteria FieldFilterCriteria
A sub selection of filter criteria

Returns

T
A new filter collection to describe the match

FieldContains<T>(T, String, String)

Adds a field filter that checks if the value of an attribute contains the given substring.

public static T FieldContains<T>(T this, string attributePath, string comparisonValue)

Type Parameters

T

Parameters

this T
The field filter collection

attributePath String
Path of attribute

comparisonValue String
Substring to search for

Returns

T

FieldStartsWith<T>(T, String, String)

Adds a field filter that checks if the value of an attribute starts with the given prefix.

public static T FieldStartsWith<T>(T this, string attributePath, string comparisonValue)

Type Parameters

T

Parameters

this T
The field filter collection

attributePath String
Path of attribute

comparisonValue String
Prefix to search for

Returns

T

FieldEndsWith<T>(T, String, String)

Adds a field filter that checks if the value of an attribute ends with the given suffix.

public static T FieldEndsWith<T>(T this, string attributePath, string comparisonValue)

Type Parameters

T

Parameters

this T
The field filter collection

attributePath String
Path of attribute

comparisonValue String
Suffix to search for

Returns

T

FieldGreaterThanOrEqual<T>(T, String, Object)

Adds a field filter that checks if the value of an attribute is greater than or equal to the given value.

public static T FieldGreaterThanOrEqual<T>(T this, string attributePath, object comparisonValue)

Type Parameters

T

Parameters

this T
The field filter collection

attributePath String
Path of attribute

comparisonValue Object
Comparison value of the field filter

Returns

T

FieldLessThanOrEqual<T>(T, String, Object)

Adds a field filter that checks if the value of an attribute is less than or equal to the given value.

public static T FieldLessThanOrEqual<T>(T this, string attributePath, object comparisonValue)

Type Parameters

T

Parameters

this T
The field filter collection

attributePath String
Path of attribute

comparisonValue Object
Comparison value of the field filter

Returns

T

FieldBetween<T>(T, String, Object, Object)

Adds a field filter that checks if the value of an attribute is between two values (inclusive).

public static T FieldBetween<T>(T this, string attributePath, object lowerValue, object upperValue)

Type Parameters

T

Parameters

this T
The field filter collection

attributePath String
Path of attribute

lowerValue Object
Lower bound value

upperValue Object
Upper bound value

Returns

T

FieldIsNull<T>(T, String)

Adds a field filter that checks if the value of an attribute is null.

public static T FieldIsNull<T>(T this, string attributePath)

Type Parameters

T

Parameters

this T
The field filter collection

attributePath String
Path of attribute

Returns

T

FieldIsNotNull<T>(T, String)

Adds a field filter that checks if the value of an attribute is not null.

public static T FieldIsNotNull<T>(T this, string attributePath)

Type Parameters

T

Parameters

this T
The field filter collection

attributePath String
Path of attribute

Returns

T

FieldRegex<T>(T, String, String)

Adds a field filter that checks if the value of an attribute matches the given regular expression.

public static T FieldRegex<T>(T this, string attributePath, string pattern)

Type Parameters

T

Parameters

this T
The field filter collection

attributePath String
Path of attribute

pattern String
Regular expression pattern

Returns

T