OptionsBuilder<TOptions>.Configure Method

Definition

Overloads

Configure(Action<TOptions>)

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

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

Registers an action used to configure a particular type of options. Note: 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. Note: 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. Note: 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. Note: 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. Note: These are run before all PostConfigure(Action<TOptions>).

Configure(Action<TOptions>)

Source:
OptionsBuilder.cs
Source:
OptionsBuilder.cs
Source:
OptionsBuilder.cs

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

public virtual Microsoft.Extensions.Options.OptionsBuilder<TOptions> Configure (Action<TOptions> configureOptions);

Parameters

configureOptions
Action<TOptions>

The action used to configure the options.

Returns

The current OptionsBuilder<TOptions>.

Applies to

.NET 9 (package-provided) og andre versioner
Produkt Versions
.NET 8 (package-provided), 9 (package-provided)
.NET Framework 4.7 (package-provided), 4.7.1 (package-provided), 4.7.2 (package-provided), 4.8 (package-provided)
.NET Standard 2.0 (package-provided), 2.1 (package-provided)

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

Source:
OptionsBuilder.cs
Source:
OptionsBuilder.cs
Source:
OptionsBuilder.cs

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

public virtual Microsoft.Extensions.Options.OptionsBuilder<TOptions> Configure<TDep> (Action<TOptions,TDep> configureOptions) where TDep : class;

Type Parameters

TDep

A dependency used by the action.

Parameters

configureOptions
Action<TOptions,TDep>

The action used to configure the options.

Returns

The current OptionsBuilder<TOptions>.

Applies to

.NET 9 (package-provided) og andre versioner
Produkt Versions
.NET 8 (package-provided), 9 (package-provided)
.NET Framework 4.7 (package-provided), 4.7.1 (package-provided), 4.7.2 (package-provided), 4.8 (package-provided)
.NET Standard 2.0 (package-provided), 2.1 (package-provided)

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

Source:
OptionsBuilder.cs
Source:
OptionsBuilder.cs
Source:
OptionsBuilder.cs

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

public virtual Microsoft.Extensions.Options.OptionsBuilder<TOptions> Configure<TDep1,TDep2,TDep3,TDep4,TDep5> (Action<TOptions,TDep1,TDep2,TDep3,TDep4,TDep5> configureOptions) where TDep1 : class where TDep2 : class where TDep3 : class where TDep4 : class where TDep5 : class;

Type Parameters

TDep1

The first dependency used by the action.

TDep2

The second dependency used by the action.

TDep3

The third dependency used by the action.

TDep4

The fourth dependency used by the action.

TDep5

The fifth dependency used by the action.

Parameters

configureOptions
Action<TOptions,TDep1,TDep2,TDep3,TDep4,TDep5>

The action used to configure the options.

Returns

The current OptionsBuilder<TOptions>.

Applies to

.NET 9 (package-provided) og andre versioner
Produkt Versions
.NET 8 (package-provided), 9 (package-provided)
.NET Framework 4.7 (package-provided), 4.7.1 (package-provided), 4.7.2 (package-provided), 4.8 (package-provided)
.NET Standard 2.0 (package-provided), 2.1 (package-provided)

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

Source:
OptionsBuilder.cs
Source:
OptionsBuilder.cs
Source:
OptionsBuilder.cs

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

public virtual Microsoft.Extensions.Options.OptionsBuilder<TOptions> Configure<TDep1,TDep2,TDep3,TDep4> (Action<TOptions,TDep1,TDep2,TDep3,TDep4> configureOptions) where TDep1 : class where TDep2 : class where TDep3 : class where TDep4 : class;

Type Parameters

TDep1

The first dependency used by the action.

TDep2

The second dependency used by the action.

TDep3

The third dependency used by the action.

TDep4

The fourth dependency used by the action.

Parameters

configureOptions
Action<TOptions,TDep1,TDep2,TDep3,TDep4>

The action used to configure the options.

Returns

The current OptionsBuilder<TOptions>.

Applies to

.NET 9 (package-provided) og andre versioner
Produkt Versions
.NET 8 (package-provided), 9 (package-provided)
.NET Framework 4.7 (package-provided), 4.7.1 (package-provided), 4.7.2 (package-provided), 4.8 (package-provided)
.NET Standard 2.0 (package-provided), 2.1 (package-provided)

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

Source:
OptionsBuilder.cs
Source:
OptionsBuilder.cs
Source:
OptionsBuilder.cs

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

public virtual Microsoft.Extensions.Options.OptionsBuilder<TOptions> Configure<TDep1,TDep2,TDep3> (Action<TOptions,TDep1,TDep2,TDep3> configureOptions) where TDep1 : class where TDep2 : class where TDep3 : class;

Type Parameters

TDep1

The first dependency used by the action.

TDep2

The second dependency used by the action.

TDep3

The third dependency used by the action.

Parameters

configureOptions
Action<TOptions,TDep1,TDep2,TDep3>

The action used to configure the options.

Returns

The current OptionsBuilder<TOptions>.

Applies to

.NET 9 (package-provided) og andre versioner
Produkt Versions
.NET 8 (package-provided), 9 (package-provided)
.NET Framework 4.7 (package-provided), 4.7.1 (package-provided), 4.7.2 (package-provided), 4.8 (package-provided)
.NET Standard 2.0 (package-provided), 2.1 (package-provided)

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

Source:
OptionsBuilder.cs
Source:
OptionsBuilder.cs
Source:
OptionsBuilder.cs

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

public virtual Microsoft.Extensions.Options.OptionsBuilder<TOptions> Configure<TDep1,TDep2> (Action<TOptions,TDep1,TDep2> configureOptions) where TDep1 : class where TDep2 : class;

Type Parameters

TDep1

The first dependency used by the action.

TDep2

The second dependency used by the action.

Parameters

configureOptions
Action<TOptions,TDep1,TDep2>

The action used to configure the options.

Returns

The current OptionsBuilder<TOptions>.

Applies to

.NET 9 (package-provided) og andre versioner
Produkt Versions
.NET 8 (package-provided), 9 (package-provided)
.NET Framework 4.7 (package-provided), 4.7.1 (package-provided), 4.7.2 (package-provided), 4.8 (package-provided)
.NET Standard 2.0 (package-provided), 2.1 (package-provided)