OptionsBuilder<TOptions>.Validate Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
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. |
Validate(Func<TOptions,Boolean>)
- Source:
- OptionsBuilder.cs
- Source:
- OptionsBuilder.cs
- Source:
- OptionsBuilder.cs
Register a validation action for an options type using a default failure message.
public:
virtual Microsoft::Extensions::Options::OptionsBuilder<TOptions> ^ Validate(Func<TOptions, bool> ^ validation);
public virtual Microsoft.Extensions.Options.OptionsBuilder<TOptions> Validate (Func<TOptions,bool> validation);
abstract member Validate : Func<'Options, bool (requires 'Options : null)> -> Microsoft.Extensions.Options.OptionsBuilder<'Options (requires 'Options : null)>
override this.Validate : Func<'Options, bool (requires 'Options : null)> -> Microsoft.Extensions.Options.OptionsBuilder<'Options (requires 'Options : null)>
Public Overridable Function Validate (validation As Func(Of TOptions, Boolean)) As OptionsBuilder(Of TOptions)
Parameters
Returns
The current OptionsBuilder<TOptions>.
Applies to
Validate(Func<TOptions,Boolean>, String)
- Source:
- OptionsBuilder.cs
- Source:
- OptionsBuilder.cs
- Source:
- OptionsBuilder.cs
Register a validation action for an options type.
public:
virtual Microsoft::Extensions::Options::OptionsBuilder<TOptions> ^ Validate(Func<TOptions, bool> ^ validation, System::String ^ failureMessage);
public virtual Microsoft.Extensions.Options.OptionsBuilder<TOptions> Validate (Func<TOptions,bool> validation, string failureMessage);
abstract member Validate : Func<'Options, bool (requires 'Options : null)> * string -> Microsoft.Extensions.Options.OptionsBuilder<'Options (requires 'Options : null)>
override this.Validate : Func<'Options, bool (requires 'Options : null)> * string -> Microsoft.Extensions.Options.OptionsBuilder<'Options (requires 'Options : null)>
Public Overridable Function Validate (validation As Func(Of TOptions, Boolean), failureMessage As String) As OptionsBuilder(Of TOptions)
Parameters
- failureMessage
- String
The failure message to use when validation fails.
Returns
The current OptionsBuilder<TOptions>.
Applies to
Validate<TDep>(Func<TOptions,TDep,Boolean>)
- Source:
- OptionsBuilder.cs
- Source:
- OptionsBuilder.cs
- Source:
- OptionsBuilder.cs
Register a validation action for an options type using a default failure message.
public:
generic <typename TDep>
virtual Microsoft::Extensions::Options::OptionsBuilder<TOptions> ^ Validate(Func<TOptions, TDep, bool> ^ validation);
public virtual Microsoft.Extensions.Options.OptionsBuilder<TOptions> Validate<TDep> (Func<TOptions,TDep,bool> validation);
abstract member Validate : Func<'Options, 'Dep, bool (requires 'Options : null)> -> Microsoft.Extensions.Options.OptionsBuilder<'Options (requires 'Options : null)>
override this.Validate : Func<'Options, 'Dep, bool (requires 'Options : null)> -> Microsoft.Extensions.Options.OptionsBuilder<'Options (requires 'Options : null)>
Public Overridable Function Validate(Of TDep) (validation As Func(Of TOptions, TDep, Boolean)) As OptionsBuilder(Of TOptions)
Type Parameters
- TDep
The dependency used by the validation function.
Parameters
Returns
The current OptionsBuilder<TOptions>.
Applies to
Validate<TDep>(Func<TOptions,TDep,Boolean>, String)
- Source:
- OptionsBuilder.cs
- Source:
- OptionsBuilder.cs
- Source:
- OptionsBuilder.cs
Register a validation action for an options type.
public:
generic <typename TDep>
virtual Microsoft::Extensions::Options::OptionsBuilder<TOptions> ^ Validate(Func<TOptions, TDep, bool> ^ validation, System::String ^ failureMessage);
public virtual Microsoft.Extensions.Options.OptionsBuilder<TOptions> Validate<TDep> (Func<TOptions,TDep,bool> validation, string failureMessage);
abstract member Validate : Func<'Options, 'Dep, bool (requires 'Options : null)> * string -> Microsoft.Extensions.Options.OptionsBuilder<'Options (requires 'Options : null)>
override this.Validate : Func<'Options, 'Dep, bool (requires 'Options : null)> * string -> Microsoft.Extensions.Options.OptionsBuilder<'Options (requires 'Options : null)>
Public Overridable Function Validate(Of TDep) (validation As Func(Of TOptions, TDep, Boolean), failureMessage As String) As OptionsBuilder(Of TOptions)
Type Parameters
- TDep
The dependency used by the validation function.
Parameters
- failureMessage
- String
The failure message to use when validation fails.
Returns
The current OptionsBuilder<TOptions>.
Applies to
Validate<TDep1,TDep2,TDep3,TDep4,TDep5>(Func<TOptions,TDep1,TDep2,TDep3,TDep4,TDep5,Boolean>)
- Source:
- OptionsBuilder.cs
- Source:
- OptionsBuilder.cs
- Source:
- OptionsBuilder.cs
Register a validation action for an options type using a default failure message.
public:
generic <typename TDep1, typename TDep2, typename TDep3, typename TDep4, typename TDep5>
virtual Microsoft::Extensions::Options::OptionsBuilder<TOptions> ^ Validate(Func<TOptions, TDep1, TDep2, TDep3, TDep4, TDep5, bool> ^ validation);
public virtual Microsoft.Extensions.Options.OptionsBuilder<TOptions> Validate<TDep1,TDep2,TDep3,TDep4,TDep5> (Func<TOptions,TDep1,TDep2,TDep3,TDep4,TDep5,bool> validation);
abstract member Validate : Func<'Options, 'TDep1, 'TDep2, 'TDep3, 'TDep4, 'TDep5, bool (requires 'Options : null)> -> Microsoft.Extensions.Options.OptionsBuilder<'Options (requires 'Options : null)>
override this.Validate : Func<'Options, 'TDep1, 'TDep2, 'TDep3, 'TDep4, 'TDep5, bool (requires 'Options : null)> -> Microsoft.Extensions.Options.OptionsBuilder<'Options (requires 'Options : null)>
Public Overridable Function Validate(Of TDep1, TDep2, TDep3, TDep4, TDep5) (validation As Func(Of TOptions, TDep1, TDep2, TDep3, TDep4, TDep5, Boolean)) As OptionsBuilder(Of TOptions)
Type Parameters
- TDep1
The first dependency used by the validation function.
- TDep2
The second dependency used by the validation function.
- TDep3
The third dependency used by the validation function.
- TDep4
The fourth dependency used by the validation function.
- TDep5
The fifth dependency used by the validation function.
Parameters
Returns
The current OptionsBuilder<TOptions>.
Applies to
Validate<TDep1,TDep2,TDep3,TDep4,TDep5>(Func<TOptions,TDep1,TDep2,TDep3,TDep4,TDep5,Boolean>, String)
- Source:
- OptionsBuilder.cs
- Source:
- OptionsBuilder.cs
- Source:
- OptionsBuilder.cs
Register a validation action for an options type.
public:
generic <typename TDep1, typename TDep2, typename TDep3, typename TDep4, typename TDep5>
virtual Microsoft::Extensions::Options::OptionsBuilder<TOptions> ^ Validate(Func<TOptions, TDep1, TDep2, TDep3, TDep4, TDep5, bool> ^ validation, System::String ^ failureMessage);
public virtual Microsoft.Extensions.Options.OptionsBuilder<TOptions> Validate<TDep1,TDep2,TDep3,TDep4,TDep5> (Func<TOptions,TDep1,TDep2,TDep3,TDep4,TDep5,bool> validation, string failureMessage);
abstract member Validate : Func<'Options, 'TDep1, 'TDep2, 'TDep3, 'TDep4, 'TDep5, bool (requires 'Options : null)> * string -> Microsoft.Extensions.Options.OptionsBuilder<'Options (requires 'Options : null)>
override this.Validate : Func<'Options, 'TDep1, 'TDep2, 'TDep3, 'TDep4, 'TDep5, bool (requires 'Options : null)> * string -> Microsoft.Extensions.Options.OptionsBuilder<'Options (requires 'Options : null)>
Public Overridable Function Validate(Of TDep1, TDep2, TDep3, TDep4, TDep5) (validation As Func(Of TOptions, TDep1, TDep2, TDep3, TDep4, TDep5, Boolean), failureMessage As String) As OptionsBuilder(Of TOptions)
Type Parameters
- TDep1
The first dependency used by the validation function.
- TDep2
The second dependency used by the validation function.
- TDep3
The third dependency used by the validation function.
- TDep4
The fourth dependency used by the validation function.
- TDep5
The fifth dependency used by the validation function.
Parameters
- failureMessage
- String
The failure message to use when validation fails.
Returns
The current OptionsBuilder<TOptions>.
Applies to
Validate<TDep1,TDep2,TDep3,TDep4>(Func<TOptions,TDep1,TDep2,TDep3,TDep4,Boolean>)
- Source:
- OptionsBuilder.cs
- Source:
- OptionsBuilder.cs
- Source:
- OptionsBuilder.cs
Register a validation action for an options type using a default failure message.
public:
generic <typename TDep1, typename TDep2, typename TDep3, typename TDep4>
virtual Microsoft::Extensions::Options::OptionsBuilder<TOptions> ^ Validate(Func<TOptions, TDep1, TDep2, TDep3, TDep4, bool> ^ validation);
public virtual Microsoft.Extensions.Options.OptionsBuilder<TOptions> Validate<TDep1,TDep2,TDep3,TDep4> (Func<TOptions,TDep1,TDep2,TDep3,TDep4,bool> validation);
abstract member Validate : Func<'Options, 'TDep1, 'TDep2, 'TDep3, 'TDep4, bool (requires 'Options : null)> -> Microsoft.Extensions.Options.OptionsBuilder<'Options (requires 'Options : null)>
override this.Validate : Func<'Options, 'TDep1, 'TDep2, 'TDep3, 'TDep4, bool (requires 'Options : null)> -> Microsoft.Extensions.Options.OptionsBuilder<'Options (requires 'Options : null)>
Public Overridable Function Validate(Of TDep1, TDep2, TDep3, TDep4) (validation As Func(Of TOptions, TDep1, TDep2, TDep3, TDep4, Boolean)) As OptionsBuilder(Of TOptions)
Type Parameters
- TDep1
The first dependency used by the validation function.
- TDep2
The second dependency used by the validation function.
- TDep3
The third dependency used by the validation function.
- TDep4
The fourth dependency used by the validation function.
Parameters
Returns
The current OptionsBuilder<TOptions>.
Applies to
Validate<TDep1,TDep2,TDep3,TDep4>(Func<TOptions,TDep1,TDep2,TDep3,TDep4,Boolean>, String)
- Source:
- OptionsBuilder.cs
- Source:
- OptionsBuilder.cs
- Source:
- OptionsBuilder.cs
Register a validation action for an options type.
public:
generic <typename TDep1, typename TDep2, typename TDep3, typename TDep4>
virtual Microsoft::Extensions::Options::OptionsBuilder<TOptions> ^ Validate(Func<TOptions, TDep1, TDep2, TDep3, TDep4, bool> ^ validation, System::String ^ failureMessage);
public virtual Microsoft.Extensions.Options.OptionsBuilder<TOptions> Validate<TDep1,TDep2,TDep3,TDep4> (Func<TOptions,TDep1,TDep2,TDep3,TDep4,bool> validation, string failureMessage);
abstract member Validate : Func<'Options, 'TDep1, 'TDep2, 'TDep3, 'TDep4, bool (requires 'Options : null)> * string -> Microsoft.Extensions.Options.OptionsBuilder<'Options (requires 'Options : null)>
override this.Validate : Func<'Options, 'TDep1, 'TDep2, 'TDep3, 'TDep4, bool (requires 'Options : null)> * string -> Microsoft.Extensions.Options.OptionsBuilder<'Options (requires 'Options : null)>
Public Overridable Function Validate(Of TDep1, TDep2, TDep3, TDep4) (validation As Func(Of TOptions, TDep1, TDep2, TDep3, TDep4, Boolean), failureMessage As String) As OptionsBuilder(Of TOptions)
Type Parameters
- TDep1
The first dependency used by the validation function.
- TDep2
The second dependency used by the validation function.
- TDep3
The third dependency used by the validation function.
- TDep4
The fourth dependency used by the validation function.
Parameters
- failureMessage
- String
The failure message to use when validation fails.
Returns
The current OptionsBuilder<TOptions>.
Applies to
Validate<TDep1,TDep2,TDep3>(Func<TOptions,TDep1,TDep2,TDep3,Boolean>)
- Source:
- OptionsBuilder.cs
- Source:
- OptionsBuilder.cs
- Source:
- OptionsBuilder.cs
Register a validation action for an options type using a default failure message.
public:
generic <typename TDep1, typename TDep2, typename TDep3>
virtual Microsoft::Extensions::Options::OptionsBuilder<TOptions> ^ Validate(Func<TOptions, TDep1, TDep2, TDep3, bool> ^ validation);
public virtual Microsoft.Extensions.Options.OptionsBuilder<TOptions> Validate<TDep1,TDep2,TDep3> (Func<TOptions,TDep1,TDep2,TDep3,bool> validation);
abstract member Validate : Func<'Options, 'TDep1, 'TDep2, 'TDep3, bool (requires 'Options : null)> -> Microsoft.Extensions.Options.OptionsBuilder<'Options (requires 'Options : null)>
override this.Validate : Func<'Options, 'TDep1, 'TDep2, 'TDep3, bool (requires 'Options : null)> -> Microsoft.Extensions.Options.OptionsBuilder<'Options (requires 'Options : null)>
Public Overridable Function Validate(Of TDep1, TDep2, TDep3) (validation As Func(Of TOptions, TDep1, TDep2, TDep3, Boolean)) As OptionsBuilder(Of TOptions)
Type Parameters
- TDep1
The first dependency used by the validation function.
- TDep2
The second dependency used by the validation function.
- TDep3
The third dependency used by the validation function.
Parameters
Returns
The current OptionsBuilder<TOptions>.
Applies to
Validate<TDep1,TDep2,TDep3>(Func<TOptions,TDep1,TDep2,TDep3,Boolean>, String)
- Source:
- OptionsBuilder.cs
- Source:
- OptionsBuilder.cs
- Source:
- OptionsBuilder.cs
Register a validation action for an options type.
public:
generic <typename TDep1, typename TDep2, typename TDep3>
virtual Microsoft::Extensions::Options::OptionsBuilder<TOptions> ^ Validate(Func<TOptions, TDep1, TDep2, TDep3, bool> ^ validation, System::String ^ failureMessage);
public virtual Microsoft.Extensions.Options.OptionsBuilder<TOptions> Validate<TDep1,TDep2,TDep3> (Func<TOptions,TDep1,TDep2,TDep3,bool> validation, string failureMessage);
abstract member Validate : Func<'Options, 'TDep1, 'TDep2, 'TDep3, bool (requires 'Options : null)> * string -> Microsoft.Extensions.Options.OptionsBuilder<'Options (requires 'Options : null)>
override this.Validate : Func<'Options, 'TDep1, 'TDep2, 'TDep3, bool (requires 'Options : null)> * string -> Microsoft.Extensions.Options.OptionsBuilder<'Options (requires 'Options : null)>
Public Overridable Function Validate(Of TDep1, TDep2, TDep3) (validation As Func(Of TOptions, TDep1, TDep2, TDep3, Boolean), failureMessage As String) As OptionsBuilder(Of TOptions)
Type Parameters
- TDep1
The first dependency used by the validation function.
- TDep2
The second dependency used by the validation function.
- TDep3
The third dependency used by the validation function.
Parameters
- failureMessage
- String
The failure message to use when validation fails.
Returns
The current OptionsBuilder<TOptions>.
Applies to
Validate<TDep1,TDep2>(Func<TOptions,TDep1,TDep2,Boolean>)
- Source:
- OptionsBuilder.cs
- Source:
- OptionsBuilder.cs
- Source:
- OptionsBuilder.cs
Register a validation action for an options type using a default failure message.
public:
generic <typename TDep1, typename TDep2>
virtual Microsoft::Extensions::Options::OptionsBuilder<TOptions> ^ Validate(Func<TOptions, TDep1, TDep2, bool> ^ validation);
public virtual Microsoft.Extensions.Options.OptionsBuilder<TOptions> Validate<TDep1,TDep2> (Func<TOptions,TDep1,TDep2,bool> validation);
abstract member Validate : Func<'Options, 'TDep1, 'TDep2, bool (requires 'Options : null)> -> Microsoft.Extensions.Options.OptionsBuilder<'Options (requires 'Options : null)>
override this.Validate : Func<'Options, 'TDep1, 'TDep2, bool (requires 'Options : null)> -> Microsoft.Extensions.Options.OptionsBuilder<'Options (requires 'Options : null)>
Public Overridable Function Validate(Of TDep1, TDep2) (validation As Func(Of TOptions, TDep1, TDep2, Boolean)) As OptionsBuilder(Of TOptions)
Type Parameters
- TDep1
The first dependency used by the validation function.
- TDep2
The second dependency used by the validation function.
Parameters
Returns
The current OptionsBuilder<TOptions>.
Applies to
Validate<TDep1,TDep2>(Func<TOptions,TDep1,TDep2,Boolean>, String)
- Source:
- OptionsBuilder.cs
- Source:
- OptionsBuilder.cs
- Source:
- OptionsBuilder.cs
Register a validation action for an options type.
public:
generic <typename TDep1, typename TDep2>
virtual Microsoft::Extensions::Options::OptionsBuilder<TOptions> ^ Validate(Func<TOptions, TDep1, TDep2, bool> ^ validation, System::String ^ failureMessage);
public virtual Microsoft.Extensions.Options.OptionsBuilder<TOptions> Validate<TDep1,TDep2> (Func<TOptions,TDep1,TDep2,bool> validation, string failureMessage);
abstract member Validate : Func<'Options, 'TDep1, 'TDep2, bool (requires 'Options : null)> * string -> Microsoft.Extensions.Options.OptionsBuilder<'Options (requires 'Options : null)>
override this.Validate : Func<'Options, 'TDep1, 'TDep2, bool (requires 'Options : null)> * string -> Microsoft.Extensions.Options.OptionsBuilder<'Options (requires 'Options : null)>
Public Overridable Function Validate(Of TDep1, TDep2) (validation As Func(Of TOptions, TDep1, TDep2, Boolean), failureMessage As String) As OptionsBuilder(Of TOptions)
Type Parameters
- TDep1
The first dependency used by the validation function.
- TDep2
The second dependency used by the validation function.
Parameters
- failureMessage
- String
The failure message to use when validation fails.
Returns
The current OptionsBuilder<TOptions>.
Applies to
.NET