OptionsServiceCollectionExtensions.AddOptionsWithValidateOnStart Methode

Definitie

Overloads

Name Description
AddOptionsWithValidateOnStart<TOptions,TValidateOptions>(IServiceCollection, String)

Voegt services toe die vereist zijn voor het gebruik van opties en dwingt validatiecontrole voor opties af bij het starten in plaats van tijdens runtime.

AddOptionsWithValidateOnStart<TOptions>(IServiceCollection, String)

Voegt services toe die vereist zijn voor het gebruik van opties en dwingt validatiecontrole voor opties af bij het starten in plaats van tijdens runtime.

AddOptionsWithValidateOnStart<TOptions,TValidateOptions>(IServiceCollection, String)

Bron:
OptionsServiceCollectionExtensions.cs
Bron:
OptionsServiceCollectionExtensions.cs
Bron:
OptionsServiceCollectionExtensions.cs
Bron:
OptionsServiceCollectionExtensions.cs

Voegt services toe die vereist zijn voor het gebruik van opties en dwingt validatiecontrole voor opties af bij het starten in plaats van tijdens runtime.

public static Microsoft.Extensions.Options.OptionsBuilder<TOptions> AddOptionsWithValidateOnStart<TOptions,TValidateOptions>(this Microsoft.Extensions.DependencyInjection.IServiceCollection services, string? name = default) where TOptions : class where TValidateOptions : class, Microsoft.Extensions.Options.IValidateOptions<TOptions>;
static member AddOptionsWithValidateOnStart : Microsoft.Extensions.DependencyInjection.IServiceCollection * string -> Microsoft.Extensions.Options.OptionsBuilder<'Options (requires 'Options : null)> (requires 'Options : null and 'ValidateOptions : null and 'ValidateOptions :> Microsoft.Extensions.Options.IValidateOptions<'Options>)
<Extension()>
Public Function AddOptionsWithValidateOnStart(Of TOptions As Class, TValidateOptions As Class) (services As IServiceCollection, Optional name As String = Nothing) As OptionsBuilder(Of TOptions)

Type parameters

TOptions

Het type opties dat moet worden geconfigureerd.

TValidateOptions

Het IValidateOptions<TOptions> validatietype.

Parameters

services
IServiceCollection

De IServiceCollection service waaraan u de services wilt toevoegen.

name
String

De naam van het exemplaar van de opties.

Retouren

De OptionsBuilder<TOptions> zodanig dat aanroepen kunnen worden gekoppeld.

Opmerkingen

De ValidateOnStart<TOptions>(OptionsBuilder<TOptions>) extensie wordt aangeroepen met deze methode.

Van toepassing op

AddOptionsWithValidateOnStart<TOptions>(IServiceCollection, String)

Bron:
OptionsServiceCollectionExtensions.cs
Bron:
OptionsServiceCollectionExtensions.cs
Bron:
OptionsServiceCollectionExtensions.cs
Bron:
OptionsServiceCollectionExtensions.cs

Voegt services toe die vereist zijn voor het gebruik van opties en dwingt validatiecontrole voor opties af bij het starten in plaats van tijdens runtime.

public static Microsoft.Extensions.Options.OptionsBuilder<TOptions> AddOptionsWithValidateOnStart<TOptions>(this Microsoft.Extensions.DependencyInjection.IServiceCollection services, string? name = default) where TOptions : class;
static member AddOptionsWithValidateOnStart : Microsoft.Extensions.DependencyInjection.IServiceCollection * string -> Microsoft.Extensions.Options.OptionsBuilder<'Options (requires 'Options : null)> (requires 'Options : null)
<Extension()>
Public Function AddOptionsWithValidateOnStart(Of TOptions As Class) (services As IServiceCollection, Optional name As String = Nothing) As OptionsBuilder(Of TOptions)

Type parameters

TOptions

Het type opties dat moet worden geconfigureerd.

Parameters

services
IServiceCollection

De IServiceCollection service waaraan u de services wilt toevoegen.

name
String

De naam van het exemplaar van de opties.

Retouren

De OptionsBuilder<TOptions> zodanig dat aanroepen kunnen worden gekoppeld.

Opmerkingen

De ValidateOnStart<TOptions>(OptionsBuilder<TOptions>) extensie wordt aangeroepen met deze methode.

Van toepassing op