[]
        
(Showing Draft Content)

C1.DataCollection.IDataCollectionEx.FilterAsync

FilterAsync Method

FilterAsync<T>(IDataCollection<T>, Expression<Func<T, object>>, FilterOperation, object)

Filters the data using specified filter parameters.

Declaration
public static Task FilterAsync<T>(this IDataCollection<T> dataCollection, Expression<Func<T, object>> filterPath, FilterOperation filterOperation, object value) where T : class?
Parameters
Type Name Description
IDataCollection<T> dataCollection

The data collection.

Expression<Func<T, object>> filterPath

The path of the data item to which the filter will be applied.

FilterOperation filterOperation

The filter operation.

object value

The value used in the expression.

Returns
Type Description
Task
Type Parameters
Name Description
T

FilterAsync<T>(IDataCollection<T>, string, FilterOperation, object)

Filters the data using specified filter parameters.

Declaration
public static Task FilterAsync<T>(this IDataCollection<T> dataCollection, string filterPath, FilterOperation filterOperation, object value) where T : class?
Parameters
Type Name Description
IDataCollection<T> dataCollection

The data collection.

string filterPath

The path of the data item to which the filter will be applied.

FilterOperation filterOperation

The filter operation.

object value

The value used in the expression.

Returns
Type Description
Task
Type Parameters
Name Description
T

FilterAsync<T>(IDataCollection<T>, string, bool, bool, bool, bool)

Filters the data from a query string.

Declaration
public static Task FilterAsync<T>(this IDataCollection<T> dataCollection, string query, bool treatSpacesAsAndOperator = true, bool matchNumbers = true, bool matchCase = false, bool matchWholeWord = false) where T : class?
Parameters
Type Name Description
IDataCollection<T> dataCollection

The data collection.

string query

The query string to be filtered.

bool treatSpacesAsAndOperator

if set to true treat spaces as and operator.

bool matchNumbers

if set to true it will look into numeric fields.

bool matchCase

If set to true the case will be taken into account.

bool matchWholeWord

If set to true the whole word will have to be matched.

Returns
Type Description
Task
Type Parameters
Name Description
T

FilterAsync<T>(IDataCollection<T>, Func<object, bool>)

Filters the data from a query string.

Declaration
public static Task FilterAsync<T>(this IDataCollection<T> dataCollection, Func<object, bool> predicate) where T : class?
Parameters
Type Name Description
IDataCollection<T> dataCollection

The data collection.

Func<object, bool> predicate

The predicate which will filter the collection.

Returns
Type Description
Task
Type Parameters
Name Description
T

FilterAsync<T>(IDataCollection<T>, FilterExpression?)

Filters the data using specified filter expression.

Declaration
public static Task FilterAsync<T>(this IDataCollection<T> dataCollection, FilterExpression? filterExpression) where T : class?
Parameters
Type Name Description
IDataCollection<T> dataCollection

The data collection.

FilterExpression filterExpression

The filter expression applied to the data.

Returns
Type Description
Task
Type Parameters
Name Description
T

FilterAsync<T>(IDataCollection<T>, FilterExpression?, CancellationToken)

Filters the data using specified filter expression.

Declaration
public static Task FilterAsync<T>(this IDataCollection<T> dataCollection, FilterExpression? filterExpression, CancellationToken cancellationToken = default) where T : class?
Parameters
Type Name Description
IDataCollection<T> dataCollection

The data collection.

FilterExpression filterExpression

The filter expression applied to the data.

CancellationToken cancellationToken

The cancellation token.

Returns
Type Description
Task
Type Parameters
Name Description
T