public Expression ToExpression() { var newExpr = _constructor.ToExpression(); if (!_setters.Any()) { return(newExpr); } return(Expression.MemberInit(newExpr, _setters.Select(x => x.ToBinding()))); }
private Expression buildInnerExpression(ParameterExpression session, ParameterExpression context) { var newExpr = _constructor.ToExpression(session, context); if (!_setters.Any()) { return(newExpr); } return(Expression.MemberInit(newExpr, _setters.Select(x => x.ToBinding(session, context)))); }