ValidateObjectMembersAttribute 构造函数
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
重载
| 名称 | 说明 |
|---|---|
| ValidateObjectMembersAttribute() |
初始化 ValidateObjectMembersAttribute 类的新实例。 |
| ValidateObjectMembersAttribute(Type) |
初始化 ValidateObjectMembersAttribute 类的新实例。 |
ValidateObjectMembersAttribute()
初始化 ValidateObjectMembersAttribute 类的新实例。
public:
ValidateObjectMembersAttribute();
public ValidateObjectMembersAttribute();
Public Sub New ()
注解
使用此字段或属性的构造函数告知代码生成器为字段/属性类型的单个成员生成验证。
适用于
ValidateObjectMembersAttribute(Type)
初始化 ValidateObjectMembersAttribute 类的新实例。
public:
ValidateObjectMembersAttribute(Type ^ validator);
public ValidateObjectMembersAttribute(Type validator);
new Microsoft.Extensions.Options.ValidateObjectMembersAttribute : Type -> Microsoft.Extensions.Options.ValidateObjectMembersAttribute
Public Sub New (validator As Type)
参数
- validator
- Type
为字段/属性的类型实现 IValidateOptions<TOptions> 的类型。
注解
使用此字段或属性的构造函数告知代码生成器使用给定类型来验证字段或属性持有的对象。