Skip to content

DovetailConfigurationOptionsExtensions

Classstaticnet10.0
📦 Joinery.Dovetail v0.4.3-beta.13
Registers strongly-typed configuration classes with the standard Extensions.Options pipeline.
namespace Joinery.Dovetail;
public static class DovetailConfigurationOptionsExtensions
{
// ...
}

The configuration joint that Dovetail's source generator emits for [DovetailConfiguration] types calls DovetailConfigurationOptionsExtensions.AddDovetailConfigurationOptions for every type, passing the Create… method it generated for it. That code creates the instance and binds the section onto it without reflection, so the registration is trimming and AOT safe, and nothing here uses reflection. A library registers only its own section, and reads it from the application's complete Configuration.IConfiguration, which the service provider supplies when the options are first created.

View all methods