ValidateObjectMembersAttribute 建構函式
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
多載
| 名稱 | Description |
|---|---|
| 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> 為欄位/屬性類型實作的型別。
備註
使用此建構子來處理欄位或屬性,會讓程式碼產生器使用該類型來驗證該欄位或屬性所持有的物件。