Class ExpressionHelpers
Provides various utilities for expression trees.
Inheritance
System.Object
ExpressionHelpers
Namespace: System.Linq.CompilerServices
Assembly: Nuqleon.Linq.CompilerServices.dll
Syntax
public static class ExpressionHelpers : Object
Methods
StripQuotes(Expression)
Strips top-level UnaryExpression expression tree nodes of type Quote, if any, from the given expression.
Declaration
public static Expression StripQuotes(this Expression expression)
Parameters
Type | Name | Description |
---|---|---|
System.Linq.Expressions.Expression | expression | Expression to strip quotes from. |
Returns
Type | Description |
---|---|
System.Linq.Expressions.Expression | Expression after unquoting. |
Unquote(Expression)
Strips top-level UnaryExpression expression tree nodes of type Quote from the given expression and returns the resulting LambdaExpression.
Declaration
public static LambdaExpression Unquote(this Expression expression)
Parameters
Type | Name | Description |
---|---|---|
System.Linq.Expressions.Expression | expression | Expression to strip quotes from. |
Returns
Type | Description |
---|---|
System.Linq.Expressions.LambdaExpression | Lambda expression after unquoting. An exception occurs if the specified expression was not a (quoted) LambdaExpression. |