I think all the answers are amazing and valid in case of me trying to register a set of options based on another set of options
but what I want to get an instance of IOptions<AppSettings>
to do something like this:
var appSettings = sp.GetRequiredService<IOptions<AppSettings>>().Value;
if (appSettings.EnableDebugTools){
// some code here
}
this is during ConfigureServices()