public class Startup
{
public void ConfigureServices(IServiceCollection services)
{
services.AddControllers();
var section = Configuration.GetSection(nameof(WeatherClientConfig));
var weatherClientConfig = section.Get<WeatherClientConfig>();
services.AddSingleton(weatherClientConfig);
}
//The rest of Startup class
}
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter