I saw an article that shows how I can Concatenate two Expression<Func<T, bool>>
variables.
But is here some ways to do this also with Expression<Action<T>>
?
Here is what I have tried:
public static Expression<Action<T>> Add<T>(this Expression<Action<T>> left, Expression<Action<T>> right)
{
//var param = Expression.Parameter(typeof(T), "x");
var body = Expression.AndAssign(
Expression.Invoke(left),
Expression.Invoke(right)
);
var lambda = Expression.Lambda<Action<T>>(body);
return lambda;
}