21.270. Class ExpressionExt
Namespace: ArmoniK.Core.Common.gRPC
Assembly: ArmoniK.Core.Common.dll
Provides extension methods for combining predicate expressions using logical AND and OR operations. Enables the construction of complex filter expressions for LINQ queries in a composable manner.
public static class ExpressionExt
21.270.1. Inheritance
21.270.2. Inherited Members
object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.MemberwiseClone(), object.ReferenceEquals(object?, object?), object.ToString()
21.270.3. Methods
21.270.3.1. ExpressionAnd<T>(Expression<Func<T, bool>>, Expression<Func<T, bool>>)
Combines two predicate expressions using a logical AND condition
public static Expression<Func<T, bool>> ExpressionAnd<T>(this Expression<Func<T, bool>> expr1, Expression<Func<T, bool>> expr2)
21.270.3.1.1. Parameters
expr1 Expression<Func<T, bool>>
The first predicate expression to combine
expr2 Expression<Func<T, bool>>
The second predicate expression to combine
21.270.3.1.2. Returns
Expression<Func<T, bool>>
A new predicate expression that represents the logical AND of the two expressions
21.270.3.1.3. Type Parameters
T
The type of the input parameter the predicate expressions are evaluated on
21.270.3.2. ExpressionOr<T>(Expression<Func<T, bool>>, Expression<Func<T, bool>>)
Combines two predicate expressions using a logical OR condition
public static Expression<Func<T, bool>> ExpressionOr<T>(this Expression<Func<T, bool>> expr1, Expression<Func<T, bool>> expr2)
21.270.3.2.1. Parameters
expr1 Expression<Func<T, bool>>
The first predicate expression to combine
expr2 Expression<Func<T, bool>>
The second predicate expression to combine
21.270.3.2.2. Returns
Expression<Func<T, bool>>
A new predicate expression that represents the logical OR of the two expressions
21.270.3.2.3. Type Parameters
T
The type of the input parameter the predicate expressions are evaluated on