OptionsBuilder<TOptions> Class

Definition

Used to configure TOptions instances.

generic <typename TOptions>
 where TOptions : classpublic ref class OptionsBuilder
public class OptionsBuilder<TOptions> where TOptions : class
type OptionsBuilder<'Options (requires 'Options : null)> = class
Public Class OptionsBuilder(Of TOptions)

Type Parameters

TOptions

The type of options being requested.

Inheritance
OptionsBuilder<TOptions>

Constructors

OptionsBuilder<TOptions>(IServiceCollection, String)

Constructor.

Properties

Name

The default name of the TOptions instance.

Services

The IServiceCollection for the options being configured.

Methods

Configure(Action<TOptions>)

Registers an action used to configure a particular type of options. These are run before all PostConfigure(Action<TOptions>).

Configure<TDep>(Action<TOptions,TDep>)

Registers an action used to configure a particular type of options. These are run before all PostConfigure(Action<TOptions>).

Configure<TDep1,TDep2,TDep3,TDep4,TDep5>(Action<TOptions,TDep1,TDep2,TDep3,TDep4,TDep5>)

Registers an action used to configure a particular type of options. These are run before all PostConfigure(Action<TOptions>).

Configure<TDep1,TDep2,TDep3,TDep4>(Action<TOptions,TDep1,TDep2,TDep3,TDep4>)

Registers an action used to configure a particular type of options. These are run before all PostConfigure(Action<TOptions>).

Configure<TDep1,TDep2,TDep3>(Action<TOptions,TDep1,TDep2,TDep3>)

Registers an action used to configure a particular type of options. These are run before all PostConfigure(Action<TOptions>).

Configure<TDep1,TDep2>(Action<TOptions,TDep1,TDep2>)

Registers an action used to configure a particular type of options. These are run before all PostConfigure(Action<TOptions>).

Equals(Object)

Determines whether the specified object is equal to the current object.

(Inherited from Object)
GetHashCode()

Serves as the default hash function.

(Inherited from Object)
GetType()

Gets the Type of the current instance.

(Inherited from Object)
MemberwiseClone()

Creates a shallow copy of the current Object.

(Inherited from Object)
PostConfigure(Action<TOptions>)

Registers an action used to configure a particular type of options. These are run after all Configure(Action<TOptions>).

PostConfigure<TDep>(Action<TOptions,TDep>)

Registers an action used to post configure a particular type of options. These are run after all Configure(Action<TOptions>).

PostConfigure<TDep1,TDep2,TDep3,TDep4,TDep5>(Action<TOptions,TDep1,TDep2,TDep3,TDep4,TDep5>)

Registers an action used to post configure a particular type of options. These are run after all Configure(Action<TOptions>).

PostConfigure<TDep1,TDep2,TDep3,TDep4>(Action<TOptions,TDep1,TDep2,TDep3,TDep4>)

Registers an action used to post configure a particular type of options. These are run after all Configure(Action<TOptions>).

PostConfigure<TDep1,TDep2,TDep3>(Action<TOptions,TDep1,TDep2,TDep3>)

Registers an action used to post configure a particular type of options. These are run after all Configure(Action<TOptions>).

PostConfigure<TDep1,TDep2>(Action<TOptions,TDep1,TDep2>)

Registers an action used to post configure a particular type of options. These are run after all Configure(Action<TOptions>).

ToString()

Returns a string that represents the current object.

(Inherited from Object)
Validate(Func<TOptions,Boolean>)

Register a validation action for an options type using a default failure message.

Validate(Func<TOptions,Boolean>, String)

Register a validation action for an options type.

Validate<TDep>(Func<TOptions,TDep,Boolean>)

Register a validation action for an options type using a default failure message.

Validate<TDep>(Func<TOptions,TDep,Boolean>, String)

Register a validation action for an options type.

Validate<TDep1,TDep2,TDep3,TDep4,TDep5>(Func<TOptions,TDep1,TDep2,TDep3,TDep4,TDep5,Boolean>)

Register a validation action for an options type using a default failure message.

Validate<TDep1,TDep2,TDep3,TDep4,TDep5>(Func<TOptions,TDep1,TDep2,TDep3,TDep4,TDep5,Boolean>, String)

Register a validation action for an options type.

Validate<TDep1,TDep2,TDep3,TDep4>(Func<TOptions,TDep1,TDep2,TDep3,TDep4,Boolean>)

Register a validation action for an options type using a default failure message.

Validate<TDep1,TDep2,TDep3,TDep4>(Func<TOptions,TDep1,TDep2,TDep3,TDep4,Boolean>, String)

Register a validation action for an options type.

Validate<TDep1,TDep2,TDep3>(Func<TOptions,TDep1,TDep2,TDep3,Boolean>)

Register a validation action for an options type using a default failure message.

Validate<TDep1,TDep2,TDep3>(Func<TOptions,TDep1,TDep2,TDep3,Boolean>, String)

Register a validation action for an options type.

Validate<TDep1,TDep2>(Func<TOptions,TDep1,TDep2,Boolean>)

Register a validation action for an options type using a default failure message.

Validate<TDep1,TDep2>(Func<TOptions,TDep1,TDep2,Boolean>, String)

Register a validation action for an options type.

Extension Methods

Bind<TOptions>(OptionsBuilder<TOptions>, IConfiguration)

Registers a configuration instance which TOptions will bind against.

Bind<TOptions>(OptionsBuilder<TOptions>, IConfiguration, Action<BinderOptions>)

Registers a configuration instance which TOptions will bind against.

BindConfiguration<TOptions>(OptionsBuilder<TOptions>, String, Action<BinderOptions>)

Registers the dependency injection container to bind TOptions against the IConfiguration obtained from the DI service provider.

ValidateDataAnnotations<TOptions>(OptionsBuilder<TOptions>)

Registers this options instance for validation of its DataAnnotations.

ValidateOnStart<TOptions>(OptionsBuilder<TOptions>)

Enforces options validation check on start rather than in runtime.

Applies to