named options
Several independently configured instances of the same options class, told apart by a name.
In more detail
Each name is configured separately with its own binding and validation. Validators receive the name, which is null or empty for the default instance.
Related terms
- options pattern — Binding a configuration section to a plain class with typed properties, validating it, and injecting it into services instead of reading raw strings.
- IValidateOptions<T> — An interface for writing options validation rules in code, such as a rule comparing two members that no single attribute can express.
Taught in
- The Options Pattern: Strongly Typed Configuration — Modern .NET Core, C# & Enterprise Microservices