1 interface inheriting from IStringLocalizer
Microsoft.Extensions.Localization.Abstractions (1)
IStringLocalizerOfT.cs (1)
10public interface IStringLocalizer<out T> : IStringLocalizer
1 implementation of IStringLocalizer
Microsoft.Extensions.Localization (1)
ResourceManagerStringLocalizer.cs (1)
21public partial class ResourceManagerStringLocalizer : IStringLocalizer
69 references to IStringLocalizer
Aspire.Dashboard (1)
Components\Controls\ApplicationName.razor.cs (1)
21public IStringLocalizer? Loc { get; set; }
Microsoft.AspNetCore.Mvc.DataAnnotations (28)
AttributeAdapterBase.cs (2)
24/// <param name="stringLocalizer">The <see cref="IStringLocalizer"/> to be used in error generation.</param> 25public AttributeAdapterBase(TAttribute attribute, IStringLocalizer? stringLocalizer)
CompareAttributeAdapter.cs (1)
16public CompareAttributeAdapter(CompareAttribute attribute, IStringLocalizer? stringLocalizer)
DataAnnotationsClientModelValidatorProvider.cs (1)
48IStringLocalizer? stringLocalizer = null;
DataAnnotationsMetadataProvider.cs (3)
97IStringLocalizer? localizer = null; 178IStringLocalizer? enumLocalizer = null; 391private static string GetDisplayName(FieldInfo field, IStringLocalizer? stringLocalizer)
DataAnnotationsModelValidator.cs (3)
17private readonly IStringLocalizer? _stringLocalizer; 24/// <param name="stringLocalizer">The <see cref="IStringLocalizer"/> used to create messages.</param> 30IStringLocalizer? stringLocalizer)
DataAnnotationsModelValidatorProvider.cs (1)
46IStringLocalizer? stringLocalizer = null;
DataTypeAttributeAdapter.cs (1)
16public DataTypeAttributeAdapter(DataTypeAttribute attribute, string ruleName, IStringLocalizer? stringLocalizer)
FileExtensionsAttributeAdapter.cs (1)
16public FileExtensionsAttributeAdapter(FileExtensionsAttribute attribute, IStringLocalizer? stringLocalizer)
IValidationAttributeAdapterProvider.cs (2)
19/// <param name="stringLocalizer">The <see cref="IStringLocalizer"/> which will be used to create messages. 22IAttributeAdapter? GetAttributeAdapter(ValidationAttribute attribute, IStringLocalizer? stringLocalizer);
MaxLengthAttributeAdapter.cs (1)
15public MaxLengthAttributeAdapter(MaxLengthAttribute attribute, IStringLocalizer? stringLocalizer)
MinLengthAttributeAdapter.cs (1)
15public MinLengthAttributeAdapter(MinLengthAttribute attribute, IStringLocalizer? stringLocalizer)
MvcDataAnnotationsLocalizationOptions.cs (2)
18/// The delegate to invoke for creating <see cref="IStringLocalizer"/>. 20public Func<Type, IStringLocalizerFactory, IStringLocalizer> DataAnnotationLocalizerProvider = null!;
RangeAttributeAdapter.cs (1)
16public RangeAttributeAdapter(RangeAttribute attribute, IStringLocalizer? stringLocalizer)
RegularExpressionAttributeAdapter.cs (1)
12public RegularExpressionAttributeAdapter(RegularExpressionAttribute attribute, IStringLocalizer? stringLocalizer)
RequiredAttributeAdapter.cs (2)
19/// <param name="stringLocalizer">The <see cref="IStringLocalizer"/>.</param> 20public RequiredAttributeAdapter(RequiredAttribute attribute, IStringLocalizer? stringLocalizer)
StringLengthAttributeAdapter.cs (1)
16public StringLengthAttributeAdapter(StringLengthAttribute attribute, IStringLocalizer? stringLocalizer)
ValidationAttributeAdapterOfTAttribute.cs (3)
18private readonly IStringLocalizer? _stringLocalizer; 23/// <param name="stringLocalizer">The <see cref="IStringLocalizer"/>.</param> 24public ValidationAttributeAdapter(TAttribute attribute, IStringLocalizer? stringLocalizer)
ValidationAttributeAdapterProvider.cs (1)
20public IAttributeAdapter? GetAttributeAdapter(ValidationAttribute attribute, IStringLocalizer? stringLocalizer)
Microsoft.AspNetCore.Mvc.Localization (5)
HtmlLocalizer.cs (4)
9/// An <see cref="IHtmlLocalizer"/> that uses the provided <see cref="IStringLocalizer"/> to do HTML-aware 14private readonly IStringLocalizer _localizer; 19/// <param name="localizer">The <see cref="IStringLocalizer"/> to read strings from.</param> 20public HtmlLocalizer(IStringLocalizer localizer)
HtmlLocalizerFactory.cs (1)
50var localizer = _factory.Create(baseName, location);
Microsoft.AspNetCore.Mvc.ViewFeatures (1)
RemoteAttributeBase.cs (1)
31private IStringLocalizer? _stringLocalizer;
Microsoft.Extensions.Localization (3)
ResourceManagerStringLocalizer.cs (1)
17/// An <see cref="IStringLocalizer"/> that uses the <see cref="ResourceManager"/> and
ResourceManagerStringLocalizerFactory.cs (2)
122public IStringLocalizer Create(Type resourceSource) 147public IStringLocalizer Create(string baseName, string location)
Microsoft.Extensions.Localization.Abstractions (16)
IStringLocalizerFactory.cs (7)
9/// Represents a factory that creates <see cref="IStringLocalizer"/> instances. 14/// Creates an <see cref="IStringLocalizer"/> using the <see cref="System.Reflection.Assembly"/> and 18/// <returns>The <see cref="IStringLocalizer"/>.</returns> 19IStringLocalizer Create(Type resourceSource); 22/// Creates an <see cref="IStringLocalizer"/>. 26/// <returns>The <see cref="IStringLocalizer"/>.</returns> 27IStringLocalizer Create(string baseName, string location);
IStringLocalizerOfT.cs (1)
7/// Represents an <see cref="IStringLocalizer"/> that provides strings for <typeparamref name="T"/>.
StringLocalizerExtensions.cs (7)
11/// Extension methods for operating on <see cref="IStringLocalizer" /> instances. 18/// <param name="stringLocalizer">The <see cref="IStringLocalizer"/>.</param> 22this IStringLocalizer stringLocalizer, 34/// <param name="stringLocalizer">The <see cref="IStringLocalizer"/>.</param> 39this IStringLocalizer stringLocalizer, 52/// <param name="stringLocalizer">The <see cref="IStringLocalizer"/>.</param> 54public static IEnumerable<LocalizedString> GetAllStrings(this IStringLocalizer stringLocalizer)
StringLocalizerOfT.cs (1)
16private readonly IStringLocalizer _localizer;
Microsoft.Extensions.Validation.Localization (15)
DefaultValidationLocalizer.cs (4)
32var localizer = GetStringLocalizer(context.DeclaringType); 56var localizer = GetStringLocalizer(context.DeclaringType); 71private IStringLocalizer GetStringLocalizer(Type? type) 79$"The delegate must return a non-null {nameof(IStringLocalizer)} instance.");
ValidationLocalizationOptions.cs (6)
11/// <see cref="IStringLocalizer"/>-based validation localizer. Configure via 17/// Gets or sets the delegate that controls which <see cref="IStringLocalizer"/> is used 42/// skips re-resolving the same <see cref="IStringLocalizer"/> on every validation call). 45/// The delegate must return a non-null <see cref="IStringLocalizer"/>. Returning <see langword="null"/> 50/// <b>Caching:</b> the validation pipeline does not cache the <see cref="IStringLocalizer"/> 62public Func<Type?, IStringLocalizerFactory, IStringLocalizer>? LocalizerProvider { get; set; }
ValidationLocalizationServiceCollectionExtensions.cs (5)
13/// Extension methods for registering the default <see cref="IStringLocalizer"/>-based validation 19/// Adds the default <see cref="IStringLocalizer"/>-based validation localizer to the 85/// Adds the default <see cref="IStringLocalizer"/>-based validation localizer configured to 97/// resolves the <see cref="IStringLocalizer"/> once and reuses the same instance for every 115IStringLocalizer? sharedLocalizer = null;