In ASP.Net Core it's possible to inject config values into a class using IOptions<T>.
So if I have the following appsettings.json config:
{
"CustomSection": {
"Foo": "Bar"
},
"RootUrl": "http://localhost:12345/"
}
I can inject IOptions<CustomSection> into my constructor (assuming I've defined a CustomSection class) and read the Foo property.
How can I inject the RootUrl setting into my constructor or is this not supported?
RootUrl