Skip to content

ReadmeGeneratorOptionsConfiguration

public class ReadmeGeneratorOptionsConfiguration

Namespace: RhoMicro.BindSight.Generators

Inheritance:

Provides configuration for the registration of IReadmeGeneratorOptions instances to IServiceCollection instances.

public ReadmeGeneratorOptionsConfiguration(bool tryAdd)

Initializes a new instance.

UseDefaultOptions(string, ServiceLifetime)
Section titled “UseDefaultOptions(string, ServiceLifetime)”
public ReadmeGeneratorOptionsConfiguration UseDefaultOptions([string configurationSection = "ReadmeGeneratorOptions"], [ServiceLifetime lifetime = Singleton])

Registers an implementation of IReadmeGeneratorOptions based on IOptions<TOptions>.

NameTypeDescription
configurationSectionStringThe configuration section to bind the options instance against.
lifetimeServiceLifetimeThe lifetime to register the options implementation with.

A reference to the configuration, for chaining of further method calls.

UseSnapshotOptions(string, ServiceLifetime)
Section titled “UseSnapshotOptions(string, ServiceLifetime)”
public ReadmeGeneratorOptionsConfiguration UseSnapshotOptions([string configurationSection = "ReadmeGeneratorOptions"], [ServiceLifetime lifetime = Scoped])

Registers an implementation of IReadmeGeneratorOptions based on IOptionsSnapshot<TOptions>.

NameTypeDescription
configurationSectionStringThe configuration section to bind the options instance against.
lifetimeServiceLifetimeThe lifetime to register the options implementation with.

A reference to the configuration, for chaining of further method calls.

UseMonitorOptions(string, ServiceLifetime)
Section titled “UseMonitorOptions(string, ServiceLifetime)”
public ReadmeGeneratorOptionsConfiguration UseMonitorOptions([string configurationSection = "ReadmeGeneratorOptions"], [ServiceLifetime lifetime = Singleton])

Registers an implementation of IReadmeGeneratorOptions based on IOptionsMonitor<TOptions>.

NameTypeDescription
configurationSectionStringThe configuration section to bind the options instance against.
lifetimeServiceLifetimeThe lifetime to register the options implementation with.

A reference to the configuration, for chaining of further method calls.

UseCustomOptions(Func<IServiceProvider, IReadmeGeneratorOptions>, ServiceLifetime)
Section titled “UseCustomOptions(Func<IServiceProvider, IReadmeGeneratorOptions>, ServiceLifetime)”
public ReadmeGeneratorOptionsConfiguration UseCustomOptions(Func<IServiceProvider, IReadmeGeneratorOptions> factory, [ServiceLifetime lifetime = Singleton])

Registers a custom implementation of IReadmeGeneratorOptions.

NameTypeDescription
The lifetime of the custom IReadmeGeneratorOptions registration.
factoryFunc<IServiceProvider, IReadmeGeneratorOptions>The delegate to register as the factory for instances of IReadmeGeneratorOptions.

A reference to the configuration, for chaining of further method calls.