Answers
- We can use one of the following interfaces:
IOptionsMonitor<TOptions>
,IOptionsFactory<TOptions>
,IOptionsSnapshot<TOptions>
, orIOptions<TOptions>
. - The configuration and the post-configuration phases.
- Configurators are executed in the order of their registration, so their order is crucial.
- Yes, we can register as many configuration classes as we want.
- Eager validation allows catching incorrectly configured options at startup time, which can prevent runtime issues.
- We must implement the
IValidateOptions<TOptions>
interface.
Learn more on Discord
To join the Discord community for this book – where you can share feedback, ask questions to the author, and learn about new releases – follow the QR code below: