Skip to content

JsonSchemaGeneratorOptionsConfiguration

public class JsonSchemaGeneratorOptionsConfiguration

Namespace: RhoMicro.BindSight.Generators

Inheritance:

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

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

Initializes a new instance.

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

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

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

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

Registers a custom implementation of IJsonSchemaGeneratorOptions.

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

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