public async Task ExecuteFuncAsync(string functionName, Dictionary <string, object> arguments, CancellationToken cancellationToken) { var request = arguments[ScriptConstants.AzureFunctionsHttpRequestKey] as HttpRequest; var function = _scriptHostManager.Instance.Functions.FirstOrDefault(f => string.Equals(f.Name, functionName)); await _routeHandler.InvokeAsync(request.HttpContext, functionName); }
public void MapFunctionRoute( string name, string template, object defaults, object constraints, object dataTokens, string functionName) { var tokens = new RouteValueDictionary(dataTokens) { { "AZUREWEBJOBS_FUNCTIONNAME", functionName } }; template = BuildRouteTemplate(_routePrefix, template); _routes.Add(new Route( new RouteHandler(c => _handler.InvokeAsync(c, functionName)), name, template, new RouteValueDictionary(defaults), new RouteValueDictionary(constraints), tokens, _constraintResolver)); }
public void MapFunctionRoute( string name, string template, object defaults, object constraints, object dataTokens, string functionName) { var tokens = new RouteValueDictionary(dataTokens) { { HttpExtensionConstants.FunctionNameRouteTokenKey, functionName } }; template = BuildRouteTemplate(_routePrefix, template); _routes.Add(new Route( new RouteHandler(c => _handler.InvokeAsync(c, functionName)), name, template, new RouteValueDictionary(defaults), new RouteValueDictionary(constraints), tokens, _constraintResolver)); }