OptionaryServiceCollectionExtensions
Classstaticnet10.0
Registers strongly-typed configuration classes with the standard
Extensions.Options pipeline. namespace Optionary;
public static class OptionaryServiceCollectionExtensions{ // ...}Remarks
Section titled Remarks The registration method Optionary's source generator emits for [Optionary] types calls Optionary 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., which the service provider supplies when the options are first created.
Methods1
Section titled MethodsOptionsBuilder<TOptions> Creates
TOptions from the configuration section at sectionPath with create, without reflection.