You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Emphasize IOptionsMonitor as the recommended choice #9662
@DamianEdwards brought up a good point recently that our options docs don't make it clear enough that IOptionsMonitor is the recommended choice going forward, since its effectively everything IOptions is but more...
I think maybe we just add a section that says something like this:
Which options interface to use?
IOptionsMonitor is generally recommended as the interface to use because it supports everything IOptions does, in addition to supporting named options, reloadable configuration, change notifications, as well as the ability to selectively invalidate instances via the IOptionsMonitorCache. (Note: these should be links to appropriate doc sections)
IOptionsSnapshot is a good alternative for scenarios where options should be recomputed on every request.
IOptions is really the only choice when using existing frameworks/libraries that are already using IOptions
Reacted by Luke Latham, Bernard Vander Beken and wenhx
Activity
guardrex commentedon Nov 21, 2018
@HaoK
IOptionsis the featured interface in the text and sample app for:Should I refactor these scenarios to use
IOptionsMonitorand moveIOptionsMonitorcoverage to the top of the topic along with the section you suggest?HaoK commentedon Nov 21, 2018
Yeah I guess so, it doesn't really matter which interface is used for those examples