configure<TOptions> method
ServiceCollection
configure<TOptions>(
- OptionsImplementationFactory<
TOptions> instance, - ConfigureOptionsAction<
TOptions> configureOptions, { - String? name,
Registers an action used to configure a particular type of options.
Implementation
ServiceCollection configure<TOptions>(
OptionsImplementationFactory<TOptions> instance,
ConfigureOptionsAction<TOptions> configureOptions, {
String? name,
}) {
addOptions<TOptions>(instance);
addSingleton<ConfigureOptions<TOptions>>(
(_) => ConfigureNamedOptions0<TOptions>(
name,
configureOptions,
),
);
return this;
}