public static Task <HttpResponseMessage> Run(HttpRequestMessage req, TraceWriter log) { Log(log, $"C# HTTP trigger function processed a request! RequestUri={req.RequestUri}"); var func = new GetACSAccessTokensHandler(req); func.FunctionNotify += (sender, args) => Log(log, args.Message); var functionArgs = new GetACSAccessTokensArgs() { StorageAccount = ConfigurationManager.AppSettings["ConfigurationStorageAccount"], StorageAccountKey = ConfigurationManager.AppSettings["ConfigurationStorageAccountKey"] }; return(Task.FromResult(func.Execute(functionArgs))); }
public static async Task <HttpResponseMessage> Run([HttpTrigger(AuthorizationLevel.Function, "get", Route = "GetACSAccessTokens")] HttpRequestMessage req, TraceWriter log) { Log(log, $"C# HTTP trigger function processed a request! RequestUri={req.RequestUri}"); var func = new GetACSAccessTokensHandler(req); func.FunctionNotify += (sender, args) => Log(log, args.Message); var getAcsAccessTokensFunctionArgs = new GetACSAccessTokensArgs { StorageAccount = ConfigurationManager.AppSettings["ConfigurationStorageAccount"], StorageAccountKey = ConfigurationManager.AppSettings["ConfigurationStorageAccountKey"] }; return(await Task.Run(() => func.Execute(getAcsAccessTokensFunctionArgs))); }