11 instantiations of LocalizedString
Aspire.Dashboard (2)
Model\Assistant\InvariantStringLocalizer.cs (2)
28return new LocalizedString(name, value ?? string.Empty, value != null); 37return new LocalizedString(name, value != null ? string.Format(CultureInfo.InvariantCulture, value, arguments) : string.Empty, value != null);
Aspire.Dashboard.Components.Tests (4)
Controls\ApplicationNameTests.cs (2)
76public LocalizedString this[string name] => new LocalizedString(name, $"Localized:{name}"); 77public LocalizedString this[string name, params object[] arguments] => new LocalizedString(name, $"Localized:{name}:" + string.Join("+", arguments));
tests\Shared\TestStringLocalizer.cs (2)
10public LocalizedString this[string name] => new LocalizedString(name, $"Localized:{name}"); 11public LocalizedString this[string name, params object[] arguments] => new LocalizedString(name, $"Localized:{name}:" + string.Join("+", arguments));
Aspire.Dashboard.Tests (2)
tests\Shared\TestStringLocalizer.cs (2)
10public LocalizedString this[string name] => new LocalizedString(name, $"Localized:{name}"); 11public LocalizedString this[string name, params object[] arguments] => new LocalizedString(name, $"Localized:{name}:" + string.Join("+", arguments));
Microsoft.Extensions.Localization (3)
ResourceManagerStringLocalizer.cs (3)
107return new LocalizedString(name, value ?? name, resourceNotFound: value == null, searchedLocation: _resourceBaseName); 121return new LocalizedString(name, value, resourceNotFound: format == null, searchedLocation: _resourceBaseName); 146yield return new LocalizedString(name, value ?? name, resourceNotFound: value == null, searchedLocation: _resourceBaseName);
62 references to LocalizedString
Aspire.Dashboard (6)
Model\Assistant\AssistantChatDataContext.cs (2)
119var toolMessage = resourceKey is { } key 164var toolMessage = resourceKey is { } key
Model\Assistant\InvariantStringLocalizer.cs (3)
23public LocalizedString this[string name] 32public LocalizedString this[string name, params object[] arguments] 41public IEnumerable<LocalizedString> GetAllStrings(bool includeParentCultures)
Model\StructuredLogMenuBuilder.cs (1)
83var header = _loc[nameof(StructuredLogs.StructuredLogsMessageColumnHeader)];
Aspire.Dashboard.Components.Tests (6)
Controls\ApplicationNameTests.cs (3)
76public LocalizedString this[string name] => new LocalizedString(name, $"Localized:{name}"); 77public LocalizedString this[string name, params object[] arguments] => new LocalizedString(name, $"Localized:{name}:" + string.Join("+", arguments)); 79public IEnumerable<LocalizedString> GetAllStrings(bool includeParentCultures) => [];
tests\Shared\TestStringLocalizer.cs (3)
10public LocalizedString this[string name] => new LocalizedString(name, $"Localized:{name}"); 11public LocalizedString this[string name, params object[] arguments] => new LocalizedString(name, $"Localized:{name}:" + string.Join("+", arguments)); 13public IEnumerable<LocalizedString> GetAllStrings(bool includeParentCultures) => [];
Aspire.Dashboard.Tests (5)
Model\AIAssistant\InvariantStringLocalizerTests.cs (2)
21var value = localizer.GetString(nameof(Columns.UnknownStateLabel).ToString()); 48var value = localizer.GetString(nameof(Columns.UnknownStateLabel).ToString());
tests\Shared\TestStringLocalizer.cs (3)
10public LocalizedString this[string name] => new LocalizedString(name, $"Localized:{name}"); 11public LocalizedString this[string name, params object[] arguments] => new LocalizedString(name, $"Localized:{name}:" + string.Join("+", arguments)); 13public IEnumerable<LocalizedString> GetAllStrings(bool includeParentCultures) => [];
Microsoft.AspNetCore.Mvc.Localization (21)
HtmlLocalizer.cs (9)
50public virtual LocalizedString GetString(string name) 58public virtual LocalizedString GetString(string name, params object[] arguments) 66public virtual IEnumerable<LocalizedString> GetAllStrings(bool includeParentCultures) => 70/// Creates a new <see cref="LocalizedHtmlString"/> for a <see cref="LocalizedString"/>. 72/// <param name="result">The <see cref="LocalizedString"/>.</param> 73protected virtual LocalizedHtmlString ToHtmlString(LocalizedString result) => 77/// Creates a new <see cref="LocalizedHtmlString"/> for a <see cref="LocalizedString"/>. 79/// <param name="result">The <see cref="LocalizedString"/>.</param> 81protected virtual LocalizedHtmlString ToHtmlString(LocalizedString result, object[] arguments) =>
HtmlLocalizerExtensions.cs (1)
47public static IEnumerable<LocalizedString> GetAllStrings(this IHtmlLocalizer htmlLocalizer)
HtmlLocalizerOfT.cs (3)
49public virtual LocalizedString GetString(string name) 57public virtual LocalizedString GetString(string name, params object[] arguments) 65public virtual IEnumerable<LocalizedString> GetAllStrings(bool includeParentCultures) =>
IHtmlLocalizer.cs (5)
34/// <returns>The string resource as a <see cref="LocalizedString"/>.</returns> 35LocalizedString GetString(string name); 42/// <returns>The formatted string resource as a <see cref="LocalizedString"/>.</returns> 43LocalizedString GetString(string name, params object[] arguments); 52IEnumerable<LocalizedString> GetAllStrings(bool includeParentCultures);
ViewLocalizer.cs (3)
65public LocalizedString GetString(string name) => _localizer.GetString(name); 68public LocalizedString GetString(string name, params object[] values) => _localizer.GetString(name, values); 71public IEnumerable<LocalizedString> GetAllStrings(bool includeParentCultures) =>
Microsoft.Extensions.Localization (4)
ResourceManagerStringLocalizer.cs (4)
99public virtual LocalizedString this[string name] 112public virtual LocalizedString this[string name, params object[] arguments] 126public virtual IEnumerable<LocalizedString> GetAllStrings(bool includeParentCultures) => 135protected IEnumerable<LocalizedString> GetAllStrings(bool includeParentCultures, CultureInfo culture)
Microsoft.Extensions.Localization.Abstractions (18)
IStringLocalizer.cs (5)
17/// <returns>The string resource as a <see cref="LocalizedString"/>.</returns> 18LocalizedString this[string name] { get; } 25/// <returns>The formatted string resource as a <see cref="LocalizedString"/>.</returns> 26LocalizedString this[string name, params object[] arguments] { get; } 35IEnumerable<LocalizedString> GetAllStrings(bool includeParentCultures);
LocalizedString.cs (5)
16/// Creates a new <see cref="LocalizedString"/>. 26/// Creates a new <see cref="LocalizedString"/>. 37/// Creates a new <see cref="LocalizedString"/>. 55/// Implicitly converts the <see cref="LocalizedString"/> to a <see cref="string"/>. 59public static implicit operator string?(LocalizedString localizedString)
StringLocalizerExtensions.cs (5)
20/// <returns>The string resource as a <see cref="LocalizedString"/>.</returns> 21public static LocalizedString GetString( 37/// <returns>The formatted string resource as a <see cref="LocalizedString"/>.</returns> 38public static LocalizedString GetString( 54public static IEnumerable<LocalizedString> GetAllStrings(this IStringLocalizer stringLocalizer)
StringLocalizerOfT.cs (3)
30public virtual LocalizedString this[string name] 41public virtual LocalizedString this[string name, params object[] arguments] 52public IEnumerable<LocalizedString> GetAllStrings(bool includeParentCultures) =>
Microsoft.Extensions.Validation.Localization (2)
DefaultValidationLocalizer.cs (2)
33var localizedName = localizer[context.DisplayName]; 57var localizedTemplate = localizer[lookupKey];