Created
November 14, 2018 06:20
-
-
Save KevinDJones/6eea660f44a0efae7c9d4f5ddc5e5a11 to your computer and use it in GitHub Desktop.
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
[assembly: WebJobsStartup(typeof(Startup))] | |
namespace YOUR.NAMESPACE | |
{ | |
internal class Startup : IWebJobsStartup | |
{ | |
public void Configure(IWebJobsBuilder builder) | |
{ | |
builder.AddDependencyInjection(ConfigureServices); | |
} | |
private void ConfigureServices(IServiceCollection services) | |
{ | |
var client = new SendGridClient(Environment.GetEnvironmentVariable("SENDGRID_API_KEY")); | |
services.AddSingleton<ISendGridClient>(client); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment