Created
April 1, 2018 14:49
-
-
Save justinyoo/10abe76f492183df1b68d7fdc12455a5 to your computer and use it in GitHub Desktop.
Dependency Injections on Azure Functions V2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static class CoreGitHubRepositoriesHttpTrigger | |
{ | |
public static IFunctionFactory Factory = new CoreFunctionFactory(new CoreAppModule()); | |
[FunctionName("CoreGitHubRepositoriesHttpTrigger")] | |
public static async Task<IActionResult> Run([HttpTrigger(AuthorizationLevel.Function, "get", Route = "core/repositories")]HttpRequest req, ILogger log) | |
{ | |
var result = await Factory.Create<IGitHubRepositoriesFunction>(log) | |
.InvokeAsync<HttpRequest, object>(req) | |
.ConfigureAwait(false); | |
return new OkObjectResult(result); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment