ValidationOptions.LocalizerProvider Property
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.
Gets or sets a delegate that resolves the IStringLocalizer used to localize validation display names and error messages for a given declaring type.
public:
property Func<Type ^, Microsoft::Extensions::Localization::IStringLocalizerFactory ^, Microsoft::Extensions::Localization::IStringLocalizer ^> ^ LocalizerProvider { Func<Type ^, Microsoft::Extensions::Localization::IStringLocalizerFactory ^, Microsoft::Extensions::Localization::IStringLocalizer ^> ^ get(); void set(Func<Type ^, Microsoft::Extensions::Localization::IStringLocalizerFactory ^, Microsoft::Extensions::Localization::IStringLocalizer ^> ^ value); };
public Func<Type,Microsoft.Extensions.Localization.IStringLocalizerFactory,Microsoft.Extensions.Localization.IStringLocalizer> LocalizerProvider { get; set; }
member this.LocalizerProvider : Func<Type, Microsoft.Extensions.Localization.IStringLocalizerFactory, Microsoft.Extensions.Localization.IStringLocalizer> with get, set
Public Property LocalizerProvider As Func(Of Type, IStringLocalizerFactory, IStringLocalizer)
Property Value
Remarks
The delegate receives the type used to resolve the localizer and the registered IStringLocalizerFactory. The default IValidatableInfoResolver sets the type argument to the declaring type for a property, the validated type itself for type-level validation, or the parameter's own type for a parameter.