private object Act(IFunctionExpression expression, IFunctionParametersFiller functionParametersFiller = null, IFunctionHandlerResolver functionHandlerResolver = null) { var executor = new FunctionExpressionExecutor(functionParametersFiller ?? Substitute.For <IFunctionParametersFiller>(), functionHandlerResolver ?? Substitute.For <IFunctionHandlerResolver>()); return(executor.Execute(expression)); }
public FunctionExpressionExecutor(IFunctionParametersFiller functionParametersFiller, IFunctionHandlerResolver functionHandlerResolver) { _functionParametersFiller = functionParametersFiller; _functionHandlerResolver = functionHandlerResolver; _executeFunctionMethod = new Lazy <MethodInfo>(() => GetType().GetMethod(nameof(ExecuteFunction), BindingFlags.Instance | BindingFlags.NonPublic)); }