Skip to content

BuildExpr fails to pass useTryCatch to BuildNestedExpression #26

Description

@RubberChickenParadise

in MRE.cs approx line 346, BuildExpr fails to pass useTryCatch causing complex nested rules to use the incorrect (when useTryCatch = false) values.

if (enumrOperation != null)
            {
                var elementType = ElementType(propType);
                var lambdaParam = Expression.Parameter(elementType, "lambdaParam");
                return rule.Rules?.Any() == true
                    ? Expression.Call(enumrOperation.MakeGenericMethod(elementType),
                        propExpression,
                        Expression.Lambda(
                            BuildNestedExpression(elementType, rule.Rules, lambdaParam, ExpressionType.AndAlso),
                            lambdaParam)


                    )
                    : Expression.Call(enumrOperation.MakeGenericMethod(elementType), propExpression);
            }

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions