3 implementations of IStringLocalizer
Aspire.Dashboard.Components.Tests (1)
Controls\ApplicationNameTests.cs (1)
73private 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>
89 references to IStringLocalizer
Aspire.Dashboard (53)
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\PropertyValues\ResourceStateValue.razor.cs (1)
28public required IStringLocalizer<Columns> Loc { get; init; }
Components\Controls\PropertyValues\SpanIdButtonValue.razor.cs (1)
31public required IStringLocalizer<Resources.Dialogs> Loc { 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)
301IStringLocalizer<Resources.Dialogs> dialogsLoc, string valueDescription, string value, bool containsSecret)
Components\Interactions\InteractionsProvider.cs (1)
76public 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\Pages\TraceDetail.razor.cs (3)
70public required IStringLocalizer<Dashboard.Resources.TraceDetail> Loc { get; init; } 73public required IStringLocalizer<Dashboard.Resources.StructuredLogs> StructuredLogsLoc { get; init; } 76public required IStringLocalizer<ControlsStrings> ControlStringsLoc { 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\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)
252public string GetDisplayName(IStringLocalizer<Commands> loc) 263public string GetDisplayDescription(IStringLocalizer<Commands> loc) 312private readonly IStringLocalizer<Resources.Resources> _loc; 328public DisplayedResourcePropertyViewModel(ResourcePropertyViewModel propertyViewModel, IStringLocalizer<Resources.Resources> loc, BrowserTimeProvider browserTimeProvider) 396public sealed record KnownProperty(string Key, Func<IStringLocalizer<Resources.Resources>, string> GetDisplayName);
Model\StructureLogsDetailsViewModel.cs (1)
13public static string GetEventName(OtlpLogEntry logEntry, IStringLocalizer<Dashboard.Resources.StructuredLogs> loc)
Model\TraceLinkHelpers.cs (2)
23IStringLocalizer<Dialogs> loc, 40IStringLocalizer<Dialogs> loc,
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>>(); 316var loc = Services.GetRequiredService<IStringLocalizer<Resources.ConsoleLogs>>(); 364var loc = Services.GetRequiredService<IStringLocalizer<Resources.ConsoleLogs>>(); 413var loc = Services.GetRequiredService<IStringLocalizer<Resources.ConsoleLogs>>(); 460var loc = Services.GetRequiredService<IStringLocalizer<Resources.ConsoleLogs>>(); 518var loc = Services.GetRequiredService<IStringLocalizer<Resources.ConsoleLogs>>(); 580var loc = Services.GetRequiredService<IStringLocalizer<Resources.ConsoleLogs>>(); 647var loc = Services.GetRequiredService<IStringLocalizer<Resources.ConsoleLogs>>(); 688var 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>());