The requested page is not available for the requested platform. You are viewing the content for .NET Framework 4.5.2+ platform.
.NET Framework 4.5.2+
.NET Framework 4.5.2+
.NET Standard 2.0+

Session.EvaluateAsync(Type, CriteriaOperator, CriteriaOperator, CancellationToken) Method

Asynchronously evaluates the specified expression against objects of the specified type.

Namespace: DevExpress.Xpo

Assembly: DevExpress.Xpo.v19.2.dll

Declaration

public Task<object> EvaluateAsync(
    Type objectType,
    CriteriaOperator expression,
    CriteriaOperator criteria,
    CancellationToken cancellationToken = default(CancellationToken)
)
Public Function EvaluateAsync(
    objectType As Type,
    expression As CriteriaOperator,
    criteria As CriteriaOperator,
    cancellationToken As CancellationToken = Nothing
) As Task(Of Object)
public Task<object> EvaluateAsync(
    Type objectType,
    CriteriaOperator expression,
    CriteriaOperator criteria,
    CancellationToken cancellationToken = default(CancellationToken)
)
Public Function EvaluateAsync(
    objectType As Type,
    expression As CriteriaOperator,
    criteria As CriteriaOperator,
    cancellationToken As CancellationToken = Nothing
) As Task(Of Object)

Parameters

Name Type Description
objectType Type

A Type object that identifies the type of objects against which the expression is evaluated.

expression CriteriaOperator

A CriteriaOperator object that specifies the expression to evaluate.

criteria CriteriaOperator

A CriteriaOperator object that specifies the filter criteria. The method evaluates the expression against objects that match these criteria.

cancellationToken CancellationToken

A CancellationToken object that delivers a cancellation notice to the running operation.

Parameters

Name Type Description
objectType Type

A Type object that identifies the type of objects against which the expression is evaluated.

expression CriteriaOperator

A CriteriaOperator object that specifies the expression to evaluate.

criteria CriteriaOperator

A CriteriaOperator object that specifies the filter criteria. The method evaluates the expression against objects that match these criteria.

cancellationToken CancellationToken

A CancellationToken object that delivers a cancellation notice to the running operation.

Returns

Type Description
Task<Object>

A Task that returns a value. This value is the evaluation's result.

Returns

Type Description
Task<Object>

A Task that returns a value. This value is the evaluation's result.

Remarks

Use this method to evaluate a specific expression against specific objects. You can pass functions specified by the Aggregate enumeration or you can pass a combination of these functions to the expression parameter. For example, you can use the "Count()" function to calculate the number of objects. The criteria parameter specifies the criteria used for object selection. The expression is evaluated only against objects that match these criteria. Set the criteria to null to evaluate the expression against all objects in the data store.

You can use the CriteriaOperator.Parse method to construct the expression and criteria. This method takes a string representation of the required expression and retrieves a CriteriaOperator object that corresponds to this expression.

See Also