共用方式為


AttributeAdapterBase<TAttribute>(TAttribute, IStringLocalizer) 建構函式

定義

將新的 AttributeAdapterBase<TAttribute> 具現化。

public:
 AttributeAdapterBase(TAttribute attribute, Microsoft::Extensions::Localization::IStringLocalizer ^ stringLocalizer);
public AttributeAdapterBase (TAttribute attribute, Microsoft.Extensions.Localization.IStringLocalizer stringLocalizer);
public AttributeAdapterBase (TAttribute attribute, Microsoft.Extensions.Localization.IStringLocalizer? stringLocalizer);
new Microsoft.AspNetCore.Mvc.DataAnnotations.AttributeAdapterBase<'Attribute (requires 'Attribute :> System.ComponentModel.DataAnnotations.ValidationAttribute)> : 'Attribute * Microsoft.Extensions.Localization.IStringLocalizer -> Microsoft.AspNetCore.Mvc.DataAnnotations.AttributeAdapterBase<'Attribute (requires 'Attribute :> System.ComponentModel.DataAnnotations.ValidationAttribute)>
Public Sub New (attribute As TAttribute, stringLocalizer As IStringLocalizer)

參數

attribute
TAttribute

ValidationAttribute 包裝的 。

stringLocalizer
IStringLocalizer

IStringLocalizer要用於產生錯誤的 。

適用於