5 implementations of
Aspire.Dashboard.Components.Tests (1)
Controls\ApplicationNameTests.cs (1)
75
public LocalizedString
this
[string name] => new LocalizedString(name, $"Localized:{name}");
Aspire.Dashboard.Tests (1)
Model\TestStringLocalizer.cs (1)
10
public LocalizedString
this
[string name] => new LocalizedString(name, $"Localized:{name}");
Microsoft.AspNetCore.Mvc.Localization.Test (1)
TestStringLocalizer.cs (1)
22
public LocalizedString
this
[string name]
Microsoft.Extensions.Localization (1)
ResourceManagerStringLocalizer.cs (1)
99
public virtual LocalizedString
this
[string name]
Microsoft.Extensions.Localization.Abstractions (1)
StringLocalizerOfT.cs (1)
30
public virtual LocalizedString
this
[string name]
201 references to
Aspire.Dashboard (128)
Components\Controls\ApplicationName.razor.cs (1)
44
applicationName = string.Format(CultureInfo.InvariantCulture, Loc
[
ResourceName], DashboardClient.ApplicationName);
Components\Controls\Chart\MetricTable.razor.cs (6)
104
Title = DialogsLoc
[
nameof(Dashboard.Resources.Dialogs.ExemplarsDialogTitle)],
105
PrimaryAction = DialogsLoc
[
nameof(Dashboard.Resources.Dialogs.DialogCloseButtonText)],
106
DismissTitle = DialogsLoc
[
nameof(Dashboard.Resources.Dialogs.DialogCloseButtonText)],
308
ValueDirectionChange.Up => (new Icons.Filled.Size16.ArrowCircleUp().WithColor(Color.Success), Loc
[
nameof(ControlsStrings.MetricTableValueIncreased)]),
309
ValueDirectionChange.Down => (new Icons.Filled.Size16.ArrowCircleDown().WithColor(Color.Warning), Loc
[
nameof(ControlsStrings.MetricTableValueDecreased)]),
310
ValueDirectionChange.Constant => (new Icons.Filled.Size16.ArrowCircleRight().WithColor(Color.Info), Loc
[
nameof(ControlsStrings.MetricTableValueNoChange)]),
Components\Controls\Chart\PlotlyChart.razor.cs (5)
50
{Loc
[
nameof(ControlsStrings.PlotlyChartValue)]}: {formattedValue}<br />
51
{Loc
[
nameof(ControlsStrings.PlotlyChartTime)]}: {FormatHelpers.FormatTime(TimeProvider, TimeProvider.ToLocal(xValue))}
147
Name = Loc
[
nameof(ControlsStrings.PlotlyChartExemplars)],
164
title = $"{Loc
[
nameof(ControlsStrings.PlotlyChartTrace)]}: {OtlpHelpers.ToShortenedId(exemplar.TraceId)}";
169
title = Loc
[
nameof(ControlsStrings.PlotlyChartExemplar)];
Components\Controls\ClearSignalsButton.razor.cs (3)
41
Text = ControlsStringsLoc
[
name: nameof(ControlsStrings.ClearAllResources)],
51
? ControlsStringsLoc
[
nameof(ControlsStrings.ClearPendingSelectedResource)]
52
: string.Format(CultureInfo.InvariantCulture, ControlsStringsLoc
[
name: nameof(ControlsStrings.ClearSelectedResource)], SelectedResource.Name),
Components\Controls\SpanActions.razor.cs (2)
41
Text = ControlsLoc
[
nameof(Resources.ControlsStrings.ActionViewDetailsText)],
47
Text = ControlsLoc
[
nameof(Resources.ControlsStrings.ActionStructuredLogsText)],
Components\Controls\StructuredLogActions.razor.cs (3)
50
Text = ControlsLoc
[
nameof(Resources.ControlsStrings.ActionViewDetailsText)],
56
Text = Loc
[
nameof(Resources.StructuredLogs.ActionLogMessageText)],
60
var header = Loc
[
nameof(Resources.StructuredLogs.StructuredLogsMessageColumnHeader)];
Components\Controls\TraceActions.razor.cs (2)
38
Text = ControlsLoc
[
nameof(Resources.ControlsStrings.ActionViewDetailsText)],
48
Text = ControlsLoc
[
nameof(Resources.ControlsStrings.ActionStructuredLogsText)],
Components\Controls\UserProfile.razor.cs (1)
55
_name = Loc
[
nameof(Login.AuthorizedUser)];
Components\Dialogs\TextVisualizerDialog.razor.cs (1)
307
DismissTitle = dialogsLoc
[
nameof(Resources.Dialogs.DialogCloseButtonText)],
Components\Interactions\InteractionsProvider.cs (4)
520
DismissTitle = Loc
[
nameof(Resources.Dialogs.DialogCloseButtonText)],
538
return Loc
[
nameof(Resources.Dialogs.InteractionButtonClose)];
541
return Loc
[
nameof(Resources.Dialogs.InteractionButtonOk)];
553
: Loc
[
nameof(Resources.Dialogs.InteractionButtonCancel)];
Components\Layout\MainLayout.razor.cs (9)
119
options.Title = Loc
[
nameof(Resources.Layout.MessageTelemetryTitle)];
120
options.Body = Loc
[
nameof(Resources.Layout.MessageTelemetryBody)];
123
Text = Loc
[
nameof(Resources.Layout.MessageTelemetryLink)],
164
Title = Loc
[
nameof(Resources.Layout.MainLayoutAspireDashboardHelpLink)],
165
DismissTitle = DialogsLoc
[
nameof(Resources.Dialogs.DialogCloseButtonText)],
166
PrimaryAction = Loc
[
nameof(Resources.Layout.MainLayoutSettingsDialogClose)],
200
Title = Loc
[
nameof(Resources.Layout.MainLayoutSettingsDialogTitle)],
201
DismissTitle = DialogsLoc
[
nameof(Resources.Dialogs.DialogCloseButtonText)],
202
PrimaryAction = Loc
[
nameof(Resources.Layout.MainLayoutSettingsDialogClose)].Value,
Components\Layout\MobileNavMenu.razor.cs (8)
39
Loc
[
nameof(Resources.Layout.NavMenuResourcesTab)],
46
Loc
[
nameof(Resources.Layout.NavMenuConsoleLogsTab)],
54
Loc
[
nameof(Resources.Layout.NavMenuStructuredLogsTab)],
61
Loc
[
nameof(Resources.Layout.NavMenuTracesTab)],
68
Loc
[
nameof(Resources.Layout.NavMenuMetricsTab)],
75
Loc
[
nameof(Resources.Layout.MainLayoutAspireRepoLink)],
84
Loc
[
nameof(Resources.Layout.MainLayoutAspireDashboardHelpLink)],
90
Loc
[
nameof(Resources.Layout.MainLayoutLaunchSettings)],
Components\Pages\ConsoleLogs.razor.cs (11)
160
_allResource = new() { Id = null, Name = ControlsStringsLoc
[
nameof(ControlsStrings.LabelAll)] };
161
PageViewModel = new ConsoleLogsViewModel { SelectedResource = _allResource, Status = Loc
[
nameof(Dashboard.Resources.ConsoleLogs.ConsoleLogsLoadingResources)] };
293
viewModel.Status = Loc
[
statusName];
373
Text = Loc
[
nameof(Dashboard.Resources.ConsoleLogs.DownloadLogs)],
409
Text = _showTimestamp ? Loc
[
nameof(Dashboard.Resources.ConsoleLogs.ConsoleLogsTimestampHide)] : Loc
[
nameof(Dashboard.Resources.ConsoleLogs.ConsoleLogsTimestampShow)],
416
Text = Loc
[
nameof(Dashboard.Resources.ConsoleLogs.ConsoleLogsTimestampShowUtc)],
424
Text = _noWrapLogs ? Loc
[
nameof(Dashboard.Resources.ConsoleLogs.ConsoleLogsWrapLogs)] : Loc
[
nameof(Dashboard.Resources.ConsoleLogs.ConsoleLogsNoWrapLogs)],
669
_resources = GetConsoleLogResourceSelectViewModels(_resourceByName, _allResource, Loc
[
nameof(Dashboard.Resources.ConsoleLogs.ConsoleLogsUnknownState)], _showHiddenResources, out var optionToSelect);
993
viewModel.Status ??= Loc
[
nameof(Dashboard.Resources.ConsoleLogs.ConsoleLogsLogsNotYetAvailable)];
Components\Pages\TraceDetail.razor.cs (3)
118
Text = ControlStringsLoc
[
nameof(ControlsStrings.ViewStructuredLogsText)],
136
Text = ControlStringsLoc
[
nameof(ControlsStrings.ExpandAllSpansText)],
144
Text = ControlStringsLoc
[
nameof(ControlsStrings.CollapseAllSpansText)],
Model\CommonMenuItems.cs (2)
29
Text = loc
[
nameof(ControlsStrings.ShowHiddenResources)],
38
Text = loc
[
nameof(ControlsStrings.HideHiddenResources)],
Model\DashboardCommandExecutor.cs (4)
110
Title = string.Format(CultureInfo.InvariantCulture, loc
[
nameof(Dashboard.Resources.Resources.ResourceCommandStarting)], messageResourceName, command.GetDisplayName(commandsLoc)),
150
toastParameters.Title = string.Format(CultureInfo.InvariantCulture, loc
[
nameof(Dashboard.Resources.Resources.ResourceCommandSuccess)], messageResourceName, command.GetDisplayName(commandsLoc));
165
toastParameters.Title = string.Format(CultureInfo.InvariantCulture, loc
[
nameof(Dashboard.Resources.Resources.ResourceCommandFailed)], messageResourceName, command.GetDisplayName(commandsLoc));
169
toastParameters.PrimaryAction = loc
[
nameof(Dashboard.Resources.Resources.ResourceCommandToastViewLogs)];
Model\DefaultInstrumentUnitResolver.cs (3)
38
return UntitleCase(loc
[
nameof(ControlsStrings.PlotlyChartCount)], titleCase);
42
return UntitleCase(loc
[
nameof(ControlsStrings.PlotlyChartLength)], titleCase);
46
return UntitleCase(loc
[
nameof(ControlsStrings.PlotlyChartValue)], titleCase);
Model\KnownPropertyLookup.cs (21)
25
new(KnownProperties.Resource.DisplayName, loc => loc
[
nameof(ResourcesDetailsDisplayNameProperty)]),
26
new(KnownProperties.Resource.State, loc => loc
[
nameof(ResourcesDetailsStateProperty)]),
27
new(KnownProperties.Resource.HealthState, loc => loc
[
nameof(ResourcesDetailsHealthStateProperty)]),
28
new(KnownProperties.Resource.StartTime, loc => loc
[
nameof(ResourcesDetailsStartTimeProperty)]),
29
new(KnownProperties.Resource.StopTime, loc => loc
[
nameof(ResourcesDetailsStopTimeProperty)]),
30
new(KnownProperties.Resource.ExitCode, loc => loc
[
nameof(ResourcesDetailsExitCodeProperty)]),
31
new(KnownProperties.Resource.ConnectionString, loc => loc
[
nameof(ResourcesDetailsConnectionStringProperty)])
37
new(KnownProperties.Project.Path, loc => loc
[
nameof(ResourcesDetailsProjectPathProperty)]),
38
new(KnownProperties.Project.LaunchProfile, loc => loc
[
nameof(ResourcesDetailsProjectLaunchProfileProperty)]),
39
new(KnownProperties.Executable.Pid, loc => loc
[
nameof(ResourcesDetailsExecutableProcessIdProperty)]),
45
new(KnownProperties.Executable.Path, loc => loc
[
nameof(ResourcesDetailsExecutablePathProperty)]),
46
new(KnownProperties.Executable.WorkDir, loc => loc
[
nameof(ResourcesDetailsExecutableWorkingDirectoryProperty)]),
47
new(KnownProperties.Executable.Args, loc => loc
[
nameof(ResourcesDetailsExecutableArgumentsProperty)]),
48
new(KnownProperties.Executable.Pid, loc => loc
[
nameof(ResourcesDetailsExecutableProcessIdProperty)]),
54
new(KnownProperties.Container.Image, loc => loc
[
nameof(ResourcesDetailsContainerImageProperty)]),
55
new(KnownProperties.Container.Id, loc => loc
[
nameof(ResourcesDetailsContainerIdProperty)]),
56
new(KnownProperties.Container.Command, loc => loc
[
nameof(ResourcesDetailsContainerCommandProperty)]),
57
new(KnownProperties.Container.Args, loc => loc
[
nameof(ResourcesDetailsContainerArgumentsProperty)]),
58
new(KnownProperties.Container.Ports, loc => loc
[
nameof(ResourcesDetailsContainerPortsProperty)]),
59
new(KnownProperties.Container.Lifetime, loc => loc
[
nameof(ResourcesDetailsContainerLifetimeProperty)]),
64
new(KnownProperties.Parameter.Value, loc => loc
[
nameof(ResourcesDetailsParameterValueProperty)])
Model\ResourceMenuItems.cs (10)
42
Text = controlLoc
[
nameof(ControlsStrings.ActionViewDetailsText)],
51
Text = loc
[
nameof(Resources.Resources.ResourceActionConsoleLogsText)],
95
Text = loc
[
nameof(Resources.Resources.ResourceActionUrlsText)],
140
Text = loc
[
nameof(Resources.Resources.ResourceActionStructuredLogsText)],
141
Tooltip = loc
[
nameof(Resources.Resources.ResourceActionStructuredLogsText)],
153
Text = loc
[
nameof(Resources.Resources.ResourceActionTracesText)],
154
Tooltip = loc
[
nameof(Resources.Resources.ResourceActionTracesText)],
167
Text = loc
[
nameof(Resources.Resources.ResourceActionMetricsText)],
168
Tooltip = loc
[
nameof(Resources.Resources.ResourceActionMetricsText)],
215
Text = loc
[
nameof(Resources.Resources.ResourceActionCommandsText)],
Model\ResourceStateViewModel.cs (5)
122
return loc
[
nameof(Columns.RunningAndUnhealthyResourceStateToolTip)];
127
return loc
[
nameof(Columns.StateColumnResourceContainerRuntimeUnhealthy)];
131
return loc
[
nameof(Columns.StateColumnResourceWaiting)];
135
return loc
[
nameof(Columns.StateColumnResourceNotStarted)];
146
{ State: null or "" } => loc
[
Columns.UnknownStateLabel],
Model\ResourceViewModel.cs (6)
256
KnownResourceCommands.StartCommand => loc
[
nameof(Commands.StartCommandDisplayName)],
257
KnownResourceCommands.StopCommand => loc
[
nameof(Commands.StopCommandDisplayName)],
258
KnownResourceCommands.RestartCommand => loc
[
nameof(Commands.RestartCommandDisplayName)],
267
KnownResourceCommands.StartCommand => loc
[
nameof(Commands.StartCommandDisplayDescription)],
268
KnownResourceCommands.StopCommand => loc
[
nameof(Commands.StopCommandDisplayDescription)],
269
KnownResourceCommands.RestartCommand => loc
[
nameof(Commands.RestartCommandDisplayDescription)],
Model\StructureLogsDetailsViewModel.cs (1)
17
?? loc
[
nameof(Dashboard.Resources.StructuredLogs.StructuredLogsEntryDetails)];
Model\TraceLinkHelpers.cs (2)
28
string.Format(CultureInfo.InvariantCulture, loc
[
nameof(Dialogs.OpenSpanDialogMessage)], OtlpHelpers.ToShortenedId(spanId)),
62
SecondaryAction = loc
[
nameof(Dialogs.OpenSpanDialogCancelButtonText)]
src\Shared\ConsoleLogs\LogPauseViewModel.cs (2)
32
loc
[
nameof(Aspire.Dashboard.Resources.ConsoleLogs.ConsoleLogsPauseActive)],
37
loc
[
nameof(Aspire.Dashboard.Resources.ConsoleLogs.ConsoleLogsPauseDetails)],
Utils\DashboardUIHelpers.cs (10)
36
ExactLabel = loc
[
nameof(ControlsStrings.FluentDataGridHeaderCellResizeLabel)],
37
ResizeMenu = loc
[
nameof(ControlsStrings.FluentDataGridHeaderCellResizeButtonText)],
38
DiscreteLabel = loc
[
nameof(ControlsStrings.FluentDataGridHeaderCellResizeDiscreteLabel)],
39
GrowAriaLabel = loc
[
nameof(ControlsStrings.FluentDataGridHeaderCellGrowAriaLabelText)],
40
ResetAriaLabel = loc
[
nameof(ControlsStrings.FluentDataGridHeaderCellResetAriaLabelText)],
41
ShrinkAriaLabel = loc
[
nameof(ControlsStrings.FluentDataGridHeaderCellShrinkAriaLabelText)],
42
SubmitAriaLabel = loc
[
nameof(ControlsStrings.FluentDataGridHeaderCellSubmitAriaLabelText)]
46
SortMenu = loc
[
nameof(ControlsStrings.FluentDataGridHeaderCellSortButtonText)],
47
SortMenuAscendingLabel = loc
[
nameof(ControlsStrings.FluentDataGridHeaderCellSortAscendingButtonText)],
48
SortMenuDescendingLabel = loc
[
nameof(ControlsStrings.FluentDataGridHeaderCellSortDescendingButtonText)]
Utils\FilterHelpers.cs (3)
52
Text = dialogsLoc
[
nameof(Dialogs.FilterDialogDisableAll)],
69
Text = dialogsLoc
[
nameof(Dialogs.FilterDialogEnableAll)],
85
Text = dialogsLoc
[
nameof(Dialogs.SettingsRemoveAllButtonText)],
Aspire.Dashboard.Components.Tests (12)
Pages\ConsoleLogsTests.cs (12)
135
cut.WaitForState(() => instance.PageViewModel.Status == loc
[
nameof(Resources.ConsoleLogs.ConsoleLogsWatchingLogs)]);
141
cut.WaitForState(() => instance.PageViewModel.Status == loc
[
nameof(Resources.ConsoleLogs.ConsoleLogsFinishedWatchingLogs)]);
167
cut.WaitForState(() => instance.PageViewModel.Status == loc
[
nameof(Resources.ConsoleLogs.ConsoleLogsWatchingLogs)]);
321
cut.WaitForState(() => instance.PageViewModel.Status == loc
[
nameof(Resources.ConsoleLogs.ConsoleLogsWatchingLogs)]);
369
cut.WaitForState(() => instance.PageViewModel.Status == loc
[
nameof(Resources.ConsoleLogs.ConsoleLogsWatchingLogs)]);
377
cut.WaitForState(() => instance.PageViewModel.Status == loc
[
nameof(Resources.ConsoleLogs.ConsoleLogsErrorWatchingLogs)]);
418
cut.WaitForState(() => instance.PageViewModel.Status == loc
[
nameof(Resources.ConsoleLogs.ConsoleLogsWatchingLogs)]);
428
cut.WaitForState(() => instance.PageViewModel.Status == loc
[
nameof(Resources.ConsoleLogs.ConsoleLogsWatchingLogs)]);
465
cut.WaitForState(() => instance.PageViewModel.Status == loc
[
nameof(Resources.ConsoleLogs.ConsoleLogsWatchingLogs)]);
525
cut.WaitForState(() => instance.PageViewModel.Status == loc
[
nameof(Resources.ConsoleLogs.ConsoleLogsWatchingLogs)]);
732
loc
[
Resources.ConsoleLogs.ConsoleLogsPauseActive],
757
loc
[
Resources.ConsoleLogs.ConsoleLogsPauseDetails],
LocalizationSample (24)
Startup.cs (24)
51
<title>{SR
[
"Request Localization"]}</title>
72
await context.Response.WriteAsync($"<h1>{SR
[
"Request Localization Sample"]}</h1>");
73
await context.Response.WriteAsync($"<h1>{SR
[
"Hello"]}</h1>");
75
await context.Response.WriteAsync($"<label for=\"culture\">{SR
[
"Culture"]}: </label>");
79
await context.Response.WriteAsync($"<label for=\"uiCulture\">{SR
[
"UI Culture"]}: </label>");
85
await context.Response.WriteAsync($"<a href=\"/\" onclick='clearCookie();'>{SR
[
"reset"]}</a>");
90
await context.Response.WriteAsync($"<tr><th>{SR
[
"Current request culture:"]}</th><td>{requestCulture.Culture.DisplayName} ({requestCulture.Culture})</td></tr>");
91
await context.Response.WriteAsync($"<tr><th>{SR
[
"Current request UI culture:"]}</th><td>{requestCulture.UICulture.DisplayName} ({requestCulture.UICulture})</td></tr>");
92
await context.Response.WriteAsync($"<tr><th>{SR
[
"Current thread culture:"]}</th><td>{CultureInfo.CurrentCulture.DisplayName} ({CultureInfo.CurrentCulture})</td></tr>");
93
await context.Response.WriteAsync($"<tr><th>{SR
[
"Current thread UI culture:"]}</th><td>{CultureInfo.CurrentUICulture.DisplayName} ({CultureInfo.CurrentUICulture})</td></tr>");
94
await context.Response.WriteAsync($"<tr><th>{SR
[
"Current date (invariant full):"]}</th><td>{DateTime.Now.ToString("F", CultureInfo.InvariantCulture)}</td></tr>");
95
await context.Response.WriteAsync($"<tr><th>{SR
[
"Current date (invariant):"]}</th><td>{DateTime.Now.ToString(CultureInfo.InvariantCulture)}</td></tr>");
96
await context.Response.WriteAsync($"<tr><th>{SR
[
"Current date (request full):"]}</th><td>{DateTime.Now.ToString("F", CultureInfo.CurrentCulture)}</td></tr>");
97
await context.Response.WriteAsync($"<tr><th>{SR
[
"Current date (request):"]}</th><td>{DateTime.Now.ToString(CultureInfo.CurrentCulture)}</td></tr>");
98
await context.Response.WriteAsync($"<tr><th>{SR
[
"Current time (invariant):"]}</th><td>{DateTime.Now.ToString("T", CultureInfo.InvariantCulture)}</td></tr>");
99
await context.Response.WriteAsync($"<tr><th>{SR
[
"Current time (request):"]}</th><td>{DateTime.Now.ToString("T", CultureInfo.CurrentCulture)}</td></tr>");
100
await context.Response.WriteAsync($"<tr><th>{SR
[
"Big number (invariant):"]}</th><td>{(Math.Pow(2, 42) + 0.42).ToString("N", CultureInfo.InvariantCulture)}</td></tr>");
101
await context.Response.WriteAsync($"<tr><th>{SR
[
"Big number (request):"]}</th><td>{(Math.Pow(2, 42) + 0.42).ToString("N", CultureInfo.CurrentCulture)}</td></tr>");
102
await context.Response.WriteAsync($"<tr><th>{SR
[
"Big number negative (invariant):"]}</th><td>{(-Math.Pow(2, 42) + 0.42).ToString("N", CultureInfo.InvariantCulture)}</td></tr>");
103
await context.Response.WriteAsync($"<tr><th>{SR
[
"Big number negative (request):"]}</th><td>{(-Math.Pow(2, 42) + 0.42).ToString("N", CultureInfo.CurrentCulture)}</td></tr>");
104
await context.Response.WriteAsync($"<tr><th>{SR
[
"Money (invariant):"]}</th><td>{2199.50.ToString("C", CultureInfo.InvariantCulture)}</td></tr>");
105
await context.Response.WriteAsync($"<tr><th>{SR
[
"Money (request):"]}</th><td>{2199.50.ToString("C", CultureInfo.CurrentCulture)}</td></tr>");
106
await context.Response.WriteAsync($"<tr><th>{SR
[
"Money negative (invariant):"]}</th><td>{(-2199.50).ToString("C", CultureInfo.InvariantCulture)}</td></tr>");
107
await context.Response.WriteAsync($"<tr><th>{SR
[
"Money negative (request):"]}</th><td>{(-2199.50).ToString("C", CultureInfo.CurrentCulture)}</td></tr>");
LocalizationWebsite (12)
StartupBuilderAPIs.cs (1)
34
await context.Response.WriteAsync(customerStringLocalizer
[
"Hello"]);
StartupResourcesAtRootFolder.cs (3)
44
await context.Response.WriteAsync(startupStringLocalizer
[
"Hello"]);
46
await context.Response.WriteAsync(stringLocalizer
[
"Hello"]);
48
await context.Response.WriteAsync(customerStringLocalizer
[
"Hello"]);
StartupResourcesInClassLibrary.cs (4)
53
await context.Response.WriteAsync(noAttributeNameStringLocalizer
[
"Hello"]);
55
await context.Response.WriteAsync(noAttributeStringLocalizer
[
"Hello"]);
57
await context.Response.WriteAsync(withAttributeNameStringLocalizer
[
"Hello"]);
59
await context.Response.WriteAsync(withAttributeStringLocalizer
[
"Hello"]);
StartupResourcesInFolder.cs (4)
47
await context.Response.WriteAsync(startupStringLocalizer
[
"Hello"]);
49
await context.Response.WriteAsync(stringLocalizer
[
"Hello"]);
51
await context.Response.WriteAsync(custromerStringLocalizer
[
"Hello"]);
53
await context.Response.WriteAsync(customCultureLocalizer
[
"Hello"]);
Microsoft.AspNetCore.Mvc.DataAnnotations (5)
DataAnnotationsMetadataProvider.cs (5)
110
displayMetadata.Description = () => localizer
[
displayAttribute.Description];
132
displayMetadata.DisplayName = () => localizer
[
displayAttribute.Name];
144
displayMetadata.DisplayName = () => localizer
[
displayNameAttribute.DisplayName];
260
displayMetadata.Placeholder = () => localizer
[
displayAttribute.Prompt];
400
name = stringLocalizer
[
name];
Microsoft.AspNetCore.Mvc.DataAnnotations.Test (7)
DataAnnotationsMetadataProviderTest.cs (7)
260
.Setup(s => s
[
"DisplayNameValue"])
298
.Setup(s => s
[
"DisplayNameValue"])
563
.Setup(s => s
[
"Model_Name"])
566
.Setup(s => s
[
"Model_Description"])
569
.Setup(s => s
[
"Model_Prompt"])
836
.Setup(s => s
[
It.IsAny<string>()])
1710
.Setup(loc => loc
[
It.IsAny<string>()])
Microsoft.AspNetCore.Mvc.Localization (3)
HtmlLocalizer.cs (3)
34
return ToHtmlString(_localizer
[
name]);
45
return ToHtmlString(_localizer
[
name], arguments);
54
return _localizer
[
name];
Microsoft.AspNetCore.Mvc.Localization.Test (4)
HtmlLocalizerTest.cs (4)
20
stringLocalizer.Setup(s => s
[
"Hello"]).Returns(localizedString);
39
stringLocalizer.Setup(s => s
[
"Hello"]).Returns(localizedString);
104
stringLocalizer.Setup(s => s
[
"Hello"]).Returns(localizedString);
142
stringLocalizer.Setup(s => s
[
"Hello"]).Returns(localizedString);
Microsoft.AspNetCore.Mvc.ViewFeatures.Test (2)
Rendering\HtmlHelperDisplayExtensionsTest.cs (1)
333
.Setup(s => s
[
"CreatedKey"])
Rendering\HtmlHelperSelectTest.cs (1)
1305
.Setup(s => s
[
It.IsAny<string>()])
Microsoft.Extensions.Localization.Abstractions (2)
StringLocalizerExtensions.cs (1)
28
return stringLocalizer
[
name];
StringLocalizerOfT.cs (1)
36
return _localizer
[
name];
Microsoft.Extensions.Localization.RootNamespace.Tests (1)
StringLocalizerOfTRootNamespaceTest.cs (1)
23
string value = valuesLoc
[
"String1"]; // Note: Tests nullable analysis of implicit string conversion operator.
Microsoft.Extensions.Localization.Tests (1)
StringLocalizerOfTTest.cs (1)
67
innerLocalizer.Verify(mock => mock
[
"Hello world"], Times.Once());