Skip to content

BindSightGeneratorOptionsConfiguration

public class BindSightGeneratorOptionsConfiguration

Namespace: RhoMicro.BindSight.Generators

Inheritance:

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

BindSightGeneratorOptionsConfiguration(bool)
Section titled “BindSightGeneratorOptionsConfiguration(bool)”
public BindSightGeneratorOptionsConfiguration(bool tryAdd)

Initializes a new instance.

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

Registers an implementation of IBindSightGeneratorOptions 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 BindSightGeneratorOptionsConfiguration UseSnapshotOptions([string configurationSection = "BindSightGeneratorOptions"], [ServiceLifetime lifetime = Scoped])

Registers an implementation of IBindSightGeneratorOptions 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 BindSightGeneratorOptionsConfiguration UseMonitorOptions([string configurationSection = "BindSightGeneratorOptions"], [ServiceLifetime lifetime = Singleton])

Registers an implementation of IBindSightGeneratorOptions 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, IBindSightGeneratorOptions>, ServiceLifetime)
Section titled “UseCustomOptions(Func<IServiceProvider, IBindSightGeneratorOptions>, ServiceLifetime)”
public BindSightGeneratorOptionsConfiguration UseCustomOptions(Func<IServiceProvider, IBindSightGeneratorOptions> factory, [ServiceLifetime lifetime = Singleton])

Registers a custom implementation of IBindSightGeneratorOptions.

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

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