public static IEnumerable<ExcelFunctionRegistration> ProcessFunctionExecutionHandlers(this IEnumerable<ExcelFunctionRegistration> registrations, FunctionExecutionConfiguration functionHandlerConfig)
        {
            foreach (var registration in registrations)
            {
                var reg = registration; // Ensure safe semantics for captured foreach variable

                // Exclude the functions created for native async, with no return values.
                // Can't deal with these yet.
                if (reg.FunctionLambda.ReturnType != typeof(void))
                {
                    var handlers = functionHandlerConfig.FunctionHandlerSelectors
                                                      .Select(fhSelector => fhSelector(reg))
                                                      .Where(fh => fh != null);
                    ApplyMethodHandlers(reg, handlers);
                }
                yield return reg;
            }
        }
Exemple #2
0
        public static IEnumerable <ExcelFunctionRegistration> ProcessFunctionExecutionHandlers(this IEnumerable <ExcelFunctionRegistration> registrations, FunctionExecutionConfiguration functionHandlerConfig)
        {
            foreach (var registration in registrations)
            {
                var reg = registration; // Ensure safe semantics for captured foreach variable

                // Exclude the functions created for native async, with no return values.
                // Can't deal with these yet.
                if (reg.FunctionLambda.ReturnType != typeof(void))
                {
                    var handlers = functionHandlerConfig.FunctionHandlerSelectors
                                   .Select(fhSelector => fhSelector(reg))
                                   .Where(fh => fh != null);
                    ApplyMethodHandlers(reg, handlers);
                }
                yield return(reg);
            }
        }