IValidationAttributeAdapterProvider.GetAttributeAdapter 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.
Returns the IAttributeAdapter for the given ValidationAttribute.
public:
Microsoft::AspNetCore::Mvc::DataAnnotations::IAttributeAdapter ^ GetAttributeAdapter(System::ComponentModel::DataAnnotations::ValidationAttribute ^ attribute, Microsoft::Extensions::Localization::IStringLocalizer ^ stringLocalizer);
public Microsoft.AspNetCore.Mvc.DataAnnotations.IAttributeAdapter GetAttributeAdapter (System.ComponentModel.DataAnnotations.ValidationAttribute attribute, Microsoft.Extensions.Localization.IStringLocalizer stringLocalizer);
public Microsoft.AspNetCore.Mvc.DataAnnotations.IAttributeAdapter? GetAttributeAdapter (System.ComponentModel.DataAnnotations.ValidationAttribute attribute, Microsoft.Extensions.Localization.IStringLocalizer? stringLocalizer);
abstract member GetAttributeAdapter : System.ComponentModel.DataAnnotations.ValidationAttribute * Microsoft.Extensions.Localization.IStringLocalizer -> Microsoft.AspNetCore.Mvc.DataAnnotations.IAttributeAdapter
Public Function GetAttributeAdapter (attribute As ValidationAttribute, stringLocalizer As IStringLocalizer) As IAttributeAdapter
Parameters
- attribute
- ValidationAttribute
The ValidationAttribute to create an IAttributeAdapter for.
- stringLocalizer
- IStringLocalizer
The IStringLocalizer which will be used to create messages.
Returns
An IAttributeAdapter for the given attribute
.