Table of Contents

Class CustomCriteriaManager

Namespace
DevExpress.Xpo
Assembly
DevExpress.Xpo.v24.1.dll

A manager for custom criteria used in LINQ to XPO expressions.

public static class CustomCriteriaManager
Inheritance
CustomCriteriaManager
Inherited Members

Properties

RegisteredCriterionCount

Returns custom criteria registered in an application via the CustomCriteriaManager.RegisterCriterion and CustomCriteriaManager.RegisterCriteria method calls.

public static int RegisteredCriterionCount { get; }

Property Value

int

A int object which containing all custom criteria registered via the methods mentioned above.

Methods

GetCriteria(MethodInfo)

Searches custom criteria registered in an application via the CustomCriteriaManager.RegisterCriterion and CustomCriteriaManager.RegisterCriteria method calls for a criterion associated with a specified method.

public static ICustomCriteriaOperatorQueryable GetCriteria(MethodInfo methodInfo)

Parameters

methodInfo MethodInfo

A MethodInfo object identifying a method associated with a custom criterion to search.

Returns

ICustomCriteriaOperatorQueryable

An ICustomCriteriaOperatorQueryable object that returns the methodInfo via the ICustomCriteriaOperatorQueryable.GetMethodInfo method implementation, if found; otherwise, null (Nothing in Visual Basic).

GetRegisteredCriteria()

Returns custom criteria registered in an application via the CustomCriteriaManager.RegisterCriterion and CustomCriteriaManager.RegisterCriteria method calls.

public static CustomCriteriaCollection GetRegisteredCriteria()

Returns

CustomCriteriaCollection

A DevExpress.Xpo.CustomCriteriaCollection object containing all custom criteria registered via the methods mentioned above.

RegisterCriteria(IEnumerable<ICustomCriteriaOperatorQueryable>)

Registers specified custom criteria to use in LINQ to XPO expressions.

public static void RegisterCriteria(IEnumerable<ICustomCriteriaOperatorQueryable> customCriteria)

Parameters

customCriteria IEnumerable<ICustomCriteriaOperatorQueryable>

A collection of ICustomCriteriaOperatorQueryable objects implementing custom criteria to register.

RegisterCriterion(ICustomCriteriaOperatorQueryable)

Registers a specified custom criterion to use in LINQ to XPO expressions.

public static void RegisterCriterion(ICustomCriteriaOperatorQueryable customCriterion)

Parameters

customCriterion ICustomCriteriaOperatorQueryable

An ICustomCriteriaOperatorQueryable object implementing a custom criterion to register.

UnregisterCriterion(ICustomCriteriaOperatorQueryable)

Unregisters a specified custom criterion from use in LINQ to XPO expressions in your application.

public static bool UnregisterCriterion(ICustomCriteriaOperatorQueryable customCriterion)

Parameters

customCriterion ICustomCriteriaOperatorQueryable

An ICustomCriteriaOperatorQueryable object instance specifying a custom critrerion to unregister.

Returns

bool

true if the customCriterion has successfully been removed from a collection returned by the CustomCriteriaManager.GetRegisteredCriteria function; otherwise, false.

UnregisterCriterion(MethodInfo)

Unregisters a custom criterion associated with a specified method from use in LINQ to XPO expressions in your application.

public static bool UnregisterCriterion(MethodInfo methodInfo)

Parameters

methodInfo MethodInfo

A MethodInfo object of a method associated with a custom criterion to unregister.

Returns

bool

true if a custom criterion associated with the method whose metadata matches the methodInfo has successfully been removed from a collection returned by the CustomCriteriaManager.GetRegisteredCriteria function; otherwise, false.