OptionsBuilderDataAnnotationsExtensions.ValidateDataAnnotations(OptionsBuilder<TOptions>) OptionsBuilderDataAnnotationsExtensions.ValidateDataAnnotations(OptionsBuilder<TOptions>) OptionsBuilderDataAnnotationsExtensions.ValidateDataAnnotations(OptionsBuilder<TOptions>) Method

Definition

Register this options instance for validation of its DataAnnotations.

public static Microsoft.Extensions.Options.OptionsBuilder<TOptions> ValidateDataAnnotations<TOptions> (this Microsoft.Extensions.Options.OptionsBuilder<TOptions> optionsBuilder) where TOptions : class;
static member ValidateDataAnnotations : Microsoft.Extensions.Options.OptionsBuilder<'Options (requires 'Options : null)> -> Microsoft.Extensions.Options.OptionsBuilder<'Options (requires 'Options : null)> (requires 'Options : null)
<Extension()>
Public Function ValidateDataAnnotations(Of TOptions As Class) (optionsBuilder As OptionsBuilder(Of TOptions)) As OptionsBuilder(Of TOptions)

Type Parameters

TOptions

The options type to be configured.

Parameters

optionsBuilder
OptionsBuilder<TOptions> OptionsBuilder<TOptions> OptionsBuilder<TOptions>

The options builder to add the services to.

Returns

Applies to