5internal static class Expressions
7 public static (Expression, Expression[], bool) GetCalleeAndArgs(MethodCallExpression expr) =>
10 null => (expr.Arguments.First(), expr.Arguments.Skip(1).ToArray(),
true),
11 var c => (c, expr.Arguments.ToArray(),
false),
14 public static LambdaExpression? UnwrapLambda(Expression expr) =>
17 ExpressionType.Lambda => (LambdaExpression)expr,
19 ExpressionType.Convert or
20 ExpressionType.ConvertChecked or
21 ExpressionType.Quote =>
22 UnwrapLambda(((UnaryExpression)expr).Operand),