Created
May 17, 2017 11:28
-
-
Save dmitry-zaets/9fd6c5b07ef5e33dbb9882e0c6d73669 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
var configurationBuilder = new ConfigurationBuilder() | |
.SetBasePath(Path.Combine(HttpRuntime.AppDomainAppPath, "configs")) | |
.AddJsonFile("settings.json", optional: false); | |
var configuration = configurationBuilder.Build(); | |
var builder = new ContainerBuilder(); | |
builder.RegisterOptions(); | |
builder.RegisterConfigurationOptions<MailingOptions>(configuration.GetSection("mailing")); | |
builder.RegisterConfigurationOptions<FeedOptions>(configuration.GetSection("feed")); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment