26.275. Class ExpressionBuilders

Namespace: ArmoniK.Core.Common.gRPC
Assembly: ArmoniK.Core.Common.dll

Generate from field accessor, the operation to apply on the field and the value to compare the field

public class ExpressionBuilders

26.275.1. Inheritance

objectExpressionBuilders

26.275.2. Inherited Members

object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.MemberwiseClone(), object.ReferenceEquals(object?, object?), object.ToString()

26.275.3. Methods

26.275.3.1. GetMemberExpression<TIn>(Expression<Func<TIn, object?>>)

Extracts the member expression from a field selector expression.

public static Expression GetMemberExpression<TIn>(Expression<Func<TIn, object?>> selector)

26.275.3.1.1. Parameters

selector Expression<Func<TIn, object?>>

The field selector expression.

26.275.3.1.2. Returns

Expression

The representing the accessed member or method call.

26.275.3.1.3. Type Parameters

TIn

The type of the input parameter for the selector expression.

26.275.3.1.4. Exceptions

NotImplementedException

Thrown if the selector’s body is not a supported expression type.

26.275.3.2. MakeBinary<TIn, T>(Expression<Func<TIn, object?>>, T, ExpressionType)

Generate for binary operations

public static Expression<Func<TIn, bool>> MakeBinary<TIn, T>(Expression<Func<TIn, object?>> selector, T value, ExpressionType binaryExpression)

26.275.3.2.1. Parameters

selector Expression<Func<TIn, object?>>

to access the field

value T

Value for the operation

binaryExpression ExpressionType

Operation to perform

26.275.3.2.2. Returns

Expression<Func<TIn, bool>>

The that represents the operation on the field with the given value

26.275.3.2.3. Type Parameters

TIn

Class from which to access the field

T

Type of the value and field on which the operation is applied

26.275.3.3. MakeCall<TIn, T>(Expression<Func<TIn, object?>>, T, Type, string, bool)

Generate for binary operations

public static Expression<Func<TIn, bool>> MakeCall<TIn, T>(Expression<Func<TIn, object?>> selector, T value, Type type, string method, bool invert = false)

26.275.3.3.1. Parameters

selector Expression<Func<TIn, object?>>

to access the field

value T

Value for the operation

type Type

Type of the collection containing the method we want to apply

method string

The name of the method from the type

invert bool

Whether we should invert the result (not operation)

26.275.3.3.2. Returns

Expression<Func<TIn, bool>>

The that represents the operation on the field with the given value

26.275.3.3.3. Type Parameters

TIn

Class from which to access the field

T

Type of the value and field on which the operation is applied

26.275.3.4. MakeCallString<TIn>(Expression<Func<TIn, object?>>, string, string, bool)

Generate for operations on strings

public static Expression<Func<TIn, bool>> MakeCallString<TIn>(Expression<Func<TIn, object?>> selector, string value, string method, bool invert = false)

26.275.3.4.1. Parameters

selector Expression<Func<TIn, object?>>

to access the field

value string

Value for the operation

method string

The name of the method from the string type

invert bool

Whether we should invert the result (not operation)

26.275.3.4.2. Returns

Expression<Func<TIn, bool>>

The that represents the operation on the field with the given value

26.275.3.4.3. Type Parameters

TIn

Class from which to access the field