Esempio n. 1
0
        public FunctionFactory(string basePath, string packagesSubPath)
        {
            this.basePath        = basePath;
            this.packagesSubPath = packagesSubPath;

            this.compiler = new FunctionCompiler();
        }
        public static IInvoker GetFunctionInvoker(
            string language, string functionName, string moduleName, string functionHandler,
            int timeout = 180000)
        {
            FunctionCompiler.PublishTestFunction(language, functionName);

            var function = new CompiledFunction(moduleName, functionHandler, functionName);
            var invoker  = new CompiledFunctionInvoker(function, timeout);

            return(invoker);
        }
Esempio n. 3
0
        public static IInvoker GetFunctionInvoker(
            string language, string functionName, string moduleName, string functionHandler,
            int timeout = 180000)
        {
            FunctionCompiler.PublishTestFunction(language, functionName);
            var publishPath = Environment.GetEnvironmentVariable("PUBLISH_PATH");

            var function = new CompiledFunction(moduleName, functionHandler, publishPath, functionName);
            var invoker  = new CompiledFunctionInvoker(function, timeout, publishPath);

            return(invoker);
        }