3 implementations of IStringLocalizer
Aspire.Dashboard.Components.Tests (1)
Controls\ApplicationNameTests.cs (1)
88private sealed class TestStringLocalizer<T> : IStringLocalizer<T>
Aspire.Dashboard.Tests (1)
Model\TestStringLocalizer.cs (1)
8public sealed class TestStringLocalizer<T> : IStringLocalizer<T>
Microsoft.Extensions.Localization.Abstractions (1)
StringLocalizerOfT.cs (1)
14public class StringLocalizer<TResourceSource> : IStringLocalizer<TResourceSource>
82 references to IStringLocalizer
Aspire.Dashboard (46)
Components\Controls\Chart\ChartBase.cs (2)
35public required IStringLocalizer<ControlsStrings> Loc { get; init; } 38public required IStringLocalizer<Resources.Dialogs> DialogsLoc { get; init; }
Components\Controls\ClearSignalsButton.razor.cs (1)
22public required IStringLocalizer<ControlsStrings> ControlsStringsLoc { get; init; }
Components\Controls\ResourceActions.razor.cs (3)
22public required IStringLocalizer<Resources.Resources> Loc { get; init; } 25public required IStringLocalizer<Resources.ControlsStrings> ControlLoc { get; init; } 28public required IStringLocalizer<Commands> CommandsLoc { get; init; }
Components\Controls\SpanActions.razor.cs (1)
22public required IStringLocalizer<Resources.ControlsStrings> ControlsLoc { get; init; }
Components\Controls\StructuredLogActions.razor.cs (3)
22public required IStringLocalizer<Resources.StructuredLogs> Loc { get; init; } 25public required IStringLocalizer<Resources.ControlsStrings> ControlsLoc { get; init; } 28public required IStringLocalizer<Resources.Dialogs> DialogsLoc { get; init; }
Components\Controls\TraceActions.razor.cs (1)
22public required IStringLocalizer<Resources.ControlsStrings> ControlsLoc { get; init; }
Components\Controls\UserProfile.razor.cs (1)
21public required IStringLocalizer<Login> Loc { get; init; }
Components\Dialogs\TextVisualizerDialog.razor.cs (1)
282IStringLocalizer<Resources.Dialogs> dialogsLoc, string valueDescription, string value, bool containsSecret)
Components\Interactions\InteractionsProvider.cs (1)
48public required IStringLocalizer<Resources.Dialogs> Loc { get; init; }
Components\Layout\MainLayout.razor.cs (2)
45public required IStringLocalizer<Resources.Layout> Loc { get; init; } 48public required IStringLocalizer<Resources.Dialogs> DialogsLoc { get; init; }
Components\Layout\MobileNavMenu.razor.cs (1)
23public required IStringLocalizer<Resources.Layout> Loc { get; init; }
Components\Pages\ConsoleLogs.razor.cs (4)
63public required IStringLocalizer<Dashboard.Resources.ConsoleLogs> Loc { get; init; } 66public required IStringLocalizer<Dashboard.Resources.Resources> ResourcesLoc { get; init; } 69public required IStringLocalizer<Commands> CommandsLoc { get; init; } 72public required IStringLocalizer<ControlsStrings> ControlsStringsLoc { get; init; }
Components\ResourcesGridColumns\StateColumnDisplay.razor.cs (1)
21public required IStringLocalizer<Columns> Loc { get; init; }
Components\ResourcesGridColumns\UrlsColumnDisplay.razor.cs (1)
26public required IStringLocalizer<Columns> Loc { get; init; }
Model\CommonMenuItems.cs (1)
16IStringLocalizer<ControlsStrings> loc,
Model\DashboardCommandExecutor.cs (2)
19IStringLocalizer<Dashboard.Resources.Resources> loc, 20IStringLocalizer<Commands> commandsLoc,
Model\DefaultInstrumentUnitResolver.cs (1)
12public sealed class DefaultInstrumentUnitResolver(IStringLocalizer<ControlsStrings> loc) : IInstrumentUnitResolver
Model\MetricsHelpers.cs (1)
23IStringLocalizer<Dialogs> loc,
Model\Otlp\TelemetryFilter.cs (2)
22public string GetDisplayText(IStringLocalizer<StructuredFiltering> loc) => $"{ResolveFieldName(Field)} {ConditionToString(Condition, loc)} {Value}"; 44public static string ConditionToString(FilterCondition c, IStringLocalizer<StructuredFiltering>? loc) =>
Model\ResourceGraph\ResourceGraphMapper.cs (1)
16public static ResourceDto MapResource(ResourceViewModel r, IDictionary<string, ResourceViewModel> resourcesByName, IStringLocalizer<Columns> columnsLoc, bool showHiddenResources)
Model\ResourceMenuItems.cs (3)
29IStringLocalizer<ControlsStrings> controlLoc, 30IStringLocalizer<Resources.Resources> loc, 31IStringLocalizer<Commands> commandsLoc,
Model\ResourceStateViewModel.cs (3)
23internal static ResourceStateViewModel GetStateViewModel(ResourceViewModel resource, IStringLocalizer<Columns> loc) 104internal static string GetResourceStateTooltip(ResourceViewModel resource, IStringLocalizer<Columns> loc) 142private static string GetStateText(ResourceViewModel resource, IStringLocalizer<Columns> loc)
Model\ResourceViewModel.cs (5)
211public string GetDisplayName(IStringLocalizer<Commands> loc) 222public string GetDisplayDescription(IStringLocalizer<Commands> loc) 271private readonly IStringLocalizer<Resources.Resources> _loc; 287public DisplayedResourcePropertyViewModel(ResourcePropertyViewModel propertyViewModel, IStringLocalizer<Resources.Resources> loc, BrowserTimeProvider browserTimeProvider) 355public sealed record KnownProperty(string Key, Func<IStringLocalizer<Resources.Resources>, string> GetDisplayName);
src\Shared\ConsoleLogs\LogPauseViewModel.cs (1)
24public string GetDisplayText(IStringLocalizer<Aspire.Dashboard.Resources.ConsoleLogs> loc, BrowserTimeProvider timeProvider)
Utils\DashboardUIHelpers.cs (1)
32public static (ColumnResizeLabels resizeLabels, ColumnSortLabels sortLabels) CreateGridLabels(IStringLocalizer<ControlsStrings> loc)
Utils\FilterHelpers.cs (2)
26IStringLocalizer<StructuredFiltering> filterLoc, 27IStringLocalizer<Dialogs> dialogsLoc,
Aspire.Dashboard.Components.Tests (22)
Pages\ConsoleLogsTests.cs (20)
84var loc = Services.GetRequiredService<IStringLocalizer<Resources.ConsoleLogs>>(); 130var loc = Services.GetRequiredService<IStringLocalizer<Resources.ConsoleLogs>>(); 209var loc = Services.GetRequiredService<IStringLocalizer<Resources.ConsoleLogs>>(); 257var loc = Services.GetRequiredService<IStringLocalizer<Resources.ConsoleLogs>>(); 306var loc = Services.GetRequiredService<IStringLocalizer<Resources.ConsoleLogs>>(); 353var loc = Services.GetRequiredService<IStringLocalizer<Resources.ConsoleLogs>>(); 411var loc = Services.GetRequiredService<IStringLocalizer<Resources.ConsoleLogs>>(); 473var loc = Services.GetRequiredService<IStringLocalizer<Resources.ConsoleLogs>>(); 540var loc = Services.GetRequiredService<IStringLocalizer<Resources.ConsoleLogs>>(); 581var loc = Services.GetRequiredService<IStringLocalizer<Resources.ConsoleLogs>>();
Pages\LoginTests.cs (2)
45var loc = Services.GetRequiredService<IStringLocalizer<Resources.ConsoleLogs>>();
LocalizationSample (1)
Startup.cs (1)
17public void Configure(IApplicationBuilder app, IStringLocalizer<Startup> SR)
LocalizationWebsite (7)
StartupBuilderAPIs.cs (1)
20IStringLocalizer<Customer> customerStringLocalizer)
StartupGetAllStrings.cs (1)
21IStringLocalizer<Customer> customerStringLocalizer)
StartupResourcesAtRootFolder.cs (2)
23IStringLocalizer<StartupResourcesAtRootFolder> startupStringLocalizer, 24IStringLocalizer<Customer> customerStringLocalizer)
StartupResourcesInFolder.cs (3)
23IStringLocalizer<StartupResourcesInFolder> startupStringLocalizer, 24IStringLocalizer<Customer> custromerStringLocalizer, 27IStringLocalizer<StartupCustomCulturePreserved> customCultureLocalizer)
Microsoft.AspNetCore.Mvc.Localization.Test (2)
MvcLocalizationMvcBuilderExtensionsTest.cs (1)
53sd => sd.ServiceType == typeof(IStringLocalizer<>));
MvcLocalizationMvcCoreBuilderExtensionsTest.cs (1)
53sd => sd.ServiceType == typeof(IStringLocalizer<>));
Microsoft.Extensions.Localization (1)
LocalizationServiceCollectionExtensions.cs (1)
58services.TryAddTransient(typeof(IStringLocalizer<>), typeof(StringLocalizer<>));
Microsoft.Extensions.Localization.Tests (3)
LocalizationServiceCollectionExtensionsTest.cs (2)
24AssertContainsSingle(collection, typeof(IStringLocalizer<>), typeof(StringLocalizer<>)); 39AssertContainsSingle(collection, typeof(IStringLocalizer<>), typeof(StringLocalizer<>));
StringLocalizerOfTTest.cs (1)
127IStringLocalizer<BaseType> localizer = new StringLocalizer<DerivedType>(Mock.Of<IStringLocalizerFactory>());