Skip to content

BindSightRunnerOptionsConfiguration

public class BindSightRunnerOptionsConfiguration

Namespace: RhoMicro.BindSight.Generators

Inheritance:

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

public BindSightRunnerOptionsConfiguration(bool tryAdd)

Initializes a new instance.

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

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

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

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

Registers a custom implementation of IBindSightRunnerOptions.

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

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