Table of Contents

Class ExpressionExtensions

Namespace
NextORM.Core
Assembly
nextorm.core.dll

Helpers for rewriting and inspecting expression trees.

public static class ExpressionExtensions
Inheritance
ExpressionExtensions
Inherited Members

Methods

Has<T>(Expression)

Determines whether the expression tree contains a node of type T.

public static bool Has<T>(this Expression exp) where T : Expression

Parameters

exp Expression

The expression tree to search.

Returns

bool

true when a matching node exists; otherwise false.

Type Parameters

T

The expression node type to look for.

Has<T>(Expression, out T?)

Determines whether the expression tree contains a node of type T and, when it does, returns the first matching node through param.

public static bool Has<T>(this Expression exp, out T? param) where T : Expression

Parameters

exp Expression

The expression tree to search.

param T

The first matching node, or null when none was found.

Returns

bool

true when a matching node exists; otherwise false.

Type Parameters

T

The expression node type to look for.

NeedToConvert(Expression)

Determines whether the expression contains a special method call that requires an explicit conversion before it can be compared.

public static bool NeedToConvert(this Expression exp)

Parameters

exp Expression

The expression tree to inspect.

Returns

bool

true when a conversion is required; otherwise false.