Class SetExpressionRewriter
An expression visitor that turns getter functions into setters
Inheritance
SetExpressionRewriter
Assembly: NMF.Expressions.dll
Syntax
public class SetExpressionRewriter : ExpressionVisitor
Constructors
|
Edit this page
View Source
SetExpressionRewriter(Expression)
Declaration
public SetExpressionRewriter(Expression value)
Parameters
Type |
Name |
Description |
Expression |
value |
The expression that is going to be inverted
|
Properties
|
Edit this page
View Source
Value
Gets the value of the rewrite
Declaration
public Expression Value { get; set; }
Property Value
Methods
|
Edit this page
View Source
CreateSetter(LambdaExpression)
Create a setter for the given getter expression
Declaration
public static LambdaExpression CreateSetter(LambdaExpression getter)
Parameters
Returns
Type |
Description |
LambdaExpression |
An expression that corresponds to the setter of the given getter
|
|
Edit this page
View Source
CreateSetter<TValue>(Expression<Func<TValue>>)
Create a setter for the given getter expression
Declaration
public static Expression<Action<TValue>> CreateSetter<TValue>(Expression<Func<TValue>> getter)
Parameters
Type |
Name |
Description |
Expression<Func<TValue>> |
getter |
The getter expression
|
Returns
Type |
Description |
Expression<Action<TValue>> |
An expression that corresponds to the setter of the given getter
|
Type Parameters
Name |
Description |
TValue |
The return type of the getter expression
|
|
Edit this page
View Source
CreateSetter<T, TValue>(Expression<Func<T, TValue>>)
Create a setter for the given getter expression
Declaration
public static Expression<Action<T, TValue>> CreateSetter<T, TValue>(Expression<Func<T, TValue>> getter)
Parameters
Type |
Name |
Description |
Expression<Func<T, TValue>> |
getter |
The getter expression
|
Returns
Type |
Description |
Expression<Action<T, TValue>> |
An expression that corresponds to the setter of the given getter
|
Type Parameters
Name |
Description |
T |
The type of the first parameter
|
TValue |
The return type of the getter expression
|
|
Edit this page
View Source
CreateSetter<T1, T2, TValue>(Expression<Func<T1, T2, TValue>>)
Create a setter for the given getter expression
Declaration
public static Expression<Action<T1, T2, TValue>> CreateSetter<T1, T2, TValue>(Expression<Func<T1, T2, TValue>> getter)
Parameters
Type |
Name |
Description |
Expression<Func<T1, T2, TValue>> |
getter |
The getter expression
|
Returns
Type |
Description |
Expression<Action<T1, T2, TValue>> |
An expression that corresponds to the setter of the given getter
|
Type Parameters
Name |
Description |
T1 |
The type of the first parameter
|
T2 |
The type of the second parameter
|
TValue |
The return type of the getter expression
|
|
Edit this page
View Source
Visit(Expression)
Declaration
public override Expression Visit(Expression node)
Parameters
Returns
Overrides
|
Edit this page
View Source
VisitBinary(BinaryExpression)
Declaration
protected override Expression VisitBinary(BinaryExpression node)
Parameters
Returns
Overrides
|
Edit this page
View Source
VisitConditional(ConditionalExpression)
Declaration
protected override Expression VisitConditional(ConditionalExpression node)
Parameters
Returns
Overrides
|
Edit this page
View Source
VisitDefault(DefaultExpression)
Declaration
protected override Expression VisitDefault(DefaultExpression node)
Parameters
Returns
Overrides
|
Edit this page
View Source
VisitElementInit(ElementInit)
Declaration
protected override ElementInit VisitElementInit(ElementInit node)
Parameters
Returns
Overrides
|
Edit this page
View Source
VisitIndex(IndexExpression)
Declaration
protected override Expression VisitIndex(IndexExpression node)
Parameters
Returns
Overrides
|
Edit this page
View Source
VisitListInit(ListInitExpression)
Declaration
protected override Expression VisitListInit(ListInitExpression node)
Parameters
Returns
Overrides
|
Edit this page
View Source
VisitMember(MemberExpression)
Declaration
protected override Expression VisitMember(MemberExpression node)
Parameters
Returns
Overrides
|
Edit this page
View Source
VisitMemberAssignment(MemberAssignment)
Declaration
protected override MemberAssignment VisitMemberAssignment(MemberAssignment node)
Parameters
Returns
Overrides
|
Edit this page
View Source
VisitMemberInit(MemberInitExpression)
Declaration
protected override Expression VisitMemberInit(MemberInitExpression node)
Parameters
Returns
Overrides
|
Edit this page
View Source
VisitMemberListBinding(MemberListBinding)
Declaration
protected override MemberListBinding VisitMemberListBinding(MemberListBinding node)
Parameters
Returns
Overrides
|
Edit this page
View Source
VisitMemberMemberBinding(MemberMemberBinding)
Declaration
protected override MemberMemberBinding VisitMemberMemberBinding(MemberMemberBinding node)
Parameters
Returns
Overrides
|
Edit this page
View Source
VisitMethodCall(MethodCallExpression)
Declaration
protected override Expression VisitMethodCall(MethodCallExpression node)
Parameters
Returns
Overrides
|
Edit this page
View Source
VisitNew(NewExpression)
Declaration
protected override Expression VisitNew(NewExpression node)
Parameters
Returns
Overrides
|
Edit this page
View Source
VisitNewArray(NewArrayExpression)
Declaration
protected override Expression VisitNewArray(NewArrayExpression node)
Parameters
Returns
Overrides
|
Edit this page
View Source
VisitParameter(ParameterExpression)
Declaration
protected override Expression VisitParameter(ParameterExpression node)
Parameters
Returns
Overrides
|
Edit this page
View Source
VisitUnary(UnaryExpression)
Declaration
protected override Expression VisitUnary(UnaryExpression node)
Parameters
Returns
Overrides
Extension Methods