ValidateOptions<TOptions,TDep1,TDep2> 类

定义

generic <typename TOptions, typename TDep1, typename TDep2>
 where TOptions : classpublic ref class ValidateOptions : Microsoft::Extensions::Options::IValidateOptions<TOptions>
public class ValidateOptions<TOptions,TDep1,TDep2> : Microsoft.Extensions.Options.IValidateOptions<TOptions> where TOptions : class
type ValidateOptions<'Options, 'TDep1, 'TDep2 (requires 'Options : null)> = class
    interface IValidateOptions<'Options (requires 'Options : null)>
Public Class ValidateOptions(Of TOptions, TDep1, TDep2)
Implements IValidateOptions(Of TOptions)

类型参数

TOptions

要验证的选项类型。The options type to validate.

TDep1

第一个依赖项类型。First dependency type.

TDep2

第二个依赖关系类型。Second dependency type.

继承
ValidateOptions<TOptions,TDep1,TDep2>
实现

构造函数

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

构造函数。Constructor.

属性

Dependency1

第一个依赖项。The first dependency.

Dependency2

第二个依赖项。The second dependency.

FailureMessage

验证失败时返回的错误。The error to return when validation fails.

Name

选项名称。The options name.

Validation

验证函数。The validation function.

方法

Equals(Object)

确定指定对象是否等于当前对象。Determines whether the specified object is equal to the current object.

(继承自 Object)
GetHashCode()

作为默认哈希函数。Serves as the default hash function.

(继承自 Object)
GetType()

获取当前实例的 TypeGets the Type of the current instance.

(继承自 Object)
MemberwiseClone()

创建当前 Object 的浅表副本。Creates a shallow copy of the current Object.

(继承自 Object)
ToString()

返回表示当前对象的字符串。Returns a string that represents the current object.

(继承自 Object)
Validate(String, TOptions)

验证特定的命名选项实例(如果 name 为 null,则验证所有命名选项实例)。Validates a specific named options instance (or all when name is null).

适用于