Learning options configuration
Now that we have covered basic usage scenarios, let’s attack some more advanced possibilities, such as creating types to configure, initialize, and validate our options.
The name of the project in the source code is OptionsConfiguration
.
We start by configuring options, which happens in two phases:
- The configuration phase.
- The post-configuration phase
In a nutshell, the post-configuration phase happens later in the process. This is a good place to enforce that some values are configured a certain way or to override configuration, for example, in integration tests.
To configure an options class, we have many options, starting with the following interfaces:
Interface |
Description |
|
Configure the default |