Created
July 19, 2017 13:15
-
-
Save justinyoo/9ef909bc84965df1c24a84d4a74f60c3 to your computer and use it in GitHub Desktop.
Testing Serverless Applications - Part 1
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 interface IGetArmTemplateDirectoriesFunction : IFunction | |
{ | |
} | |
public class GetArmTemplateDirectoriesFunction : FunctionBase, IGetArmTemplateDirectoriesFunction | |
{ | |
private readonly IGitHubService _gitHubService; | |
public GetArmTemplateDirectoriesFunction(IGitHubService gitHubService) | |
{ | |
this._gitHubService = gitHubService.ThrowIfNullOrDefault(); | |
} | |
public override async Task<HttpResponseMessage> InvokeAsync<TOptions>(HttpRequestMessage req, TOptions options = default(TOptions)) | |
{ | |
var @params = options as GetArmTemplateDirectoriesFunctionParameterOptions; | |
var directories = await this._gitHubService.GetArmTemplateDirectoriesAsync(@params.Query).ConfigureAwait(false); | |
return this.CreateOkResponse(req, directories); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment