public LambdaExpression ToSetterLambda(Type concreteType, ParameterExpression target) { var lambdaType = typeof(Action <, ,>).MakeGenericType(typeof(IBuildSession), typeof(IContext), concreteType); var method = _member.As <PropertyInfo>().GetSetMethod(); var callSetMethod = Expression.Call(target, method, AssignedValue.ToExpression(Parameters.Session, Parameters.Context)); return(Expression.Lambda(lambdaType, callSetMethod, Parameters.Session, Parameters.Context, target)); }
public override string ToString() { if (IsAssigned) { return(AssignedValue.ToString()); } else { return(CurrentValidValues.ToString()); } }
public MemberBinding ToBinding() { return(Expression.Bind(_member, AssignedValue.ToExpression())); }
public MemberBinding ToBinding(ParameterExpression session, ParameterExpression context) { return(Expression.Bind(_member, AssignedValue.ToExpression(session, context))); }