DovetailConfigurationAttribute<T>
Classsealednet10.0
Declares the configuration section of an options type
T from the assembly, for types you don't own. namespace Joinery.Dovetail.Attributes;
public sealed class DovetailConfigurationAttribute<T> : System.Attribute where T : class{ // ...}T: classAttribute
6 members
Type Parameters
Section titled Type ParametersTThe options type.
Remarks
Section titled Remarks For example, [assembly:.
The section path follows the same rules as Dovetail. Apply it once for each type you configure. A type has one section: naming it twice, or also declaring it with the class form, is reported as DT0015. Dovetail works as it does on the class form.
Only works with source generators enabled.
Constructors2
Section titled Constructors Declares
T under the section derived from its name. Declares
T under section. Properties4
Section titled PropertiesKeyStyle get; set How the configuration keys are spelled: those of every bound property and constructor parameter of the options type and of the object types nested in it, and the default section path derived from the type name. The default is
ConfigurationKeyStyle.Undefined , which keeps the declared names. See ConfigurationKeyStyle . RegisterOptions get; setbool Whether to register
IOptions<T> for the type. false only describes the section in the schema. The default is true. ValidateOnStart get; setbool Whether to validate the options when the host starts. The default is
false.