DovetailConfigurationAttribute
appsettings.schema.json for editor completion and validation, and registers it with the options pipeline. namespace Joinery.Dovetail.Attributes;
public sealed class DovetailConfigurationAttribute : System.Attribute{ // ...}Remarks
Section titled Remarks Without a section path the section is the type name with an Options, Settings, Configuration or Config suffix removed, so Greetings becomes Greetings. Nested sections use :, as in "Http:.
A type has one section, so it can be declared once. For a type you don't own, use the assembly form, Attributes..
Dovetail picks how the keys of the type and of the types nested in it are spelled (as declared, Pascal, camel, dash or underscore case). A type that several sections reach has to spell its keys the same way in all of them; DT0016 reports a mismatch.
The generated registration reads its own section from the application's complete I and creates or binds the options.
Only works with source generators enabled.
Constructors2
Section titled Constructorssection. Properties4
Section titled PropertiesKeyStyle get; setConfigurationKeyStyle.Undefined , which keeps the declared names. See ConfigurationKeyStyle . RegisterOptions get; setboolIOptions<T> for the type. false only describes the section in the schema. The default is true. ValidateOnStart get; setboolfalse.