Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Log whether the localization resource is found or not #55897

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -166,16 +166,26 @@

if (_missingManifestCache.ContainsKey(cacheKey))
{
Log.ResourceNotFound(_logger, name);

return null;
}

try
{
return _resourceManager.GetString(name, culture);
var value = _resourceManager.GetString(name, culture);

if (name != value)
{
Log.ResourceNotFound(_logger, name);
}

return value;
}
catch (MissingManifestResourceException)
{
_missingManifestCache.TryAdd(cacheKey, null);

return null;
}
}
Expand Down Expand Up @@ -221,5 +231,8 @@
{
[LoggerMessage(1, LogLevel.Debug, $"{nameof(ResourceManagerStringLocalizer)} searched for '{{Key}}' in '{{LocationSearched}}' with culture '{{Culture}}'.", EventName = "SearchedLocation")]
public static partial void SearchedLocation(ILogger logger, string key, string locationSearched, CultureInfo culture);

[LoggerMessage(2, LogLevel.Debug, $"A resource for '{{Key}}' with culture '{{Culture}}' was not found.", EventName = "ResourceNotFound")]

Check failure on line 235 in src/Localization/Localization/src/ResourceManagerStringLocalizer.cs

View check run for this annotation

Azure Pipelines / aspnetcore-ci (Build Build: Linux ARM64)

src/Localization/Localization/src/ResourceManagerStringLocalizer.cs#L235

src/Localization/Localization/src/ResourceManagerStringLocalizer.cs(235,10): error SYSLIB1014: (NETCORE_ENGINEERING_TELEMETRY=Build) Template 'Culture' is not provided as argument to the logging method (https://learn.microsoft.com/dotnet/fundamentals/syslib-diagnostics/syslib1014)

Check failure on line 235 in src/Localization/Localization/src/ResourceManagerStringLocalizer.cs

View check run for this annotation

Azure Pipelines / aspnetcore-ci (Build Build: Linux ARM64)

src/Localization/Localization/src/ResourceManagerStringLocalizer.cs#L235

src/Localization/Localization/src/ResourceManagerStringLocalizer.cs(235,10): error SYSLIB1014: (NETCORE_ENGINEERING_TELEMETRY=Build) Template 'Culture' is not provided as argument to the logging method (https://learn.microsoft.com/dotnet/fundamentals/syslib-diagnostics/syslib1014)

Check failure on line 235 in src/Localization/Localization/src/ResourceManagerStringLocalizer.cs

View check run for this annotation

Azure Pipelines / aspnetcore-ci (Build Build: Linux ARM64)

src/Localization/Localization/src/ResourceManagerStringLocalizer.cs#L235

src/Localization/Localization/src/ResourceManagerStringLocalizer.cs(235,10): error SYSLIB1014: (NETCORE_ENGINEERING_TELEMETRY=Build) Template 'Culture' is not provided as argument to the logging method (https://learn.microsoft.com/dotnet/fundamentals/syslib-diagnostics/syslib1014)

Check failure on line 235 in src/Localization/Localization/src/ResourceManagerStringLocalizer.cs

View check run for this annotation

Azure Pipelines / aspnetcore-ci (Build Build: Linux x64)

src/Localization/Localization/src/ResourceManagerStringLocalizer.cs#L235

src/Localization/Localization/src/ResourceManagerStringLocalizer.cs(235,10): error SYSLIB1014: (NETCORE_ENGINEERING_TELEMETRY=Build) Template 'Culture' is not provided as argument to the logging method (https://learn.microsoft.com/dotnet/fundamentals/syslib-diagnostics/syslib1014)

Check failure on line 235 in src/Localization/Localization/src/ResourceManagerStringLocalizer.cs

View check run for this annotation

Azure Pipelines / aspnetcore-ci (Build Build: Linux x64)

src/Localization/Localization/src/ResourceManagerStringLocalizer.cs#L235

src/Localization/Localization/src/ResourceManagerStringLocalizer.cs(235,10): error SYSLIB1014: (NETCORE_ENGINEERING_TELEMETRY=Build) Template 'Culture' is not provided as argument to the logging method (https://learn.microsoft.com/dotnet/fundamentals/syslib-diagnostics/syslib1014)

Check failure on line 235 in src/Localization/Localization/src/ResourceManagerStringLocalizer.cs

View check run for this annotation

Azure Pipelines / aspnetcore-ci (Build Build: Linux x64)

src/Localization/Localization/src/ResourceManagerStringLocalizer.cs#L235

src/Localization/Localization/src/ResourceManagerStringLocalizer.cs(235,10): error SYSLIB1014: (NETCORE_ENGINEERING_TELEMETRY=Build) Template 'Culture' is not provided as argument to the logging method (https://learn.microsoft.com/dotnet/fundamentals/syslib-diagnostics/syslib1014)

Check failure on line 235 in src/Localization/Localization/src/ResourceManagerStringLocalizer.cs

View check run for this annotation

Azure Pipelines / aspnetcore-ci (Build Build: Linux Musl ARM)

src/Localization/Localization/src/ResourceManagerStringLocalizer.cs#L235

src/Localization/Localization/src/ResourceManagerStringLocalizer.cs(235,10): error SYSLIB1014: (NETCORE_ENGINEERING_TELEMETRY=Build) Template 'Culture' is not provided as argument to the logging method (https://learn.microsoft.com/dotnet/fundamentals/syslib-diagnostics/syslib1014)

Check failure on line 235 in src/Localization/Localization/src/ResourceManagerStringLocalizer.cs

View check run for this annotation

Azure Pipelines / aspnetcore-ci (Build Build: Linux Musl ARM)

src/Localization/Localization/src/ResourceManagerStringLocalizer.cs#L235

src/Localization/Localization/src/ResourceManagerStringLocalizer.cs(235,10): error SYSLIB1014: (NETCORE_ENGINEERING_TELEMETRY=Build) Template 'Culture' is not provided as argument to the logging method (https://learn.microsoft.com/dotnet/fundamentals/syslib-diagnostics/syslib1014)

Check failure on line 235 in src/Localization/Localization/src/ResourceManagerStringLocalizer.cs

View check run for this annotation

Azure Pipelines / aspnetcore-ci (Build Build: Linux Musl ARM)

src/Localization/Localization/src/ResourceManagerStringLocalizer.cs#L235

src/Localization/Localization/src/ResourceManagerStringLocalizer.cs(235,10): error SYSLIB1014: (NETCORE_ENGINEERING_TELEMETRY=Build) Template 'Culture' is not provided as argument to the logging method (https://learn.microsoft.com/dotnet/fundamentals/syslib-diagnostics/syslib1014)

Check failure on line 235 in src/Localization/Localization/src/ResourceManagerStringLocalizer.cs

View check run for this annotation

Azure Pipelines / aspnetcore-ci (Build Build: macOS arm64)

src/Localization/Localization/src/ResourceManagerStringLocalizer.cs#L235

src/Localization/Localization/src/ResourceManagerStringLocalizer.cs(235,10): error SYSLIB1014: (NETCORE_ENGINEERING_TELEMETRY=Build) Template 'Culture' is not provided as argument to the logging method (https://learn.microsoft.com/dotnet/fundamentals/syslib-diagnostics/syslib1014)

Check failure on line 235 in src/Localization/Localization/src/ResourceManagerStringLocalizer.cs

View check run for this annotation

Azure Pipelines / aspnetcore-ci (Build Build: macOS arm64)

src/Localization/Localization/src/ResourceManagerStringLocalizer.cs#L235

src/Localization/Localization/src/ResourceManagerStringLocalizer.cs(235,10): error SYSLIB1014: (NETCORE_ENGINEERING_TELEMETRY=Build) Template 'Culture' is not provided as argument to the logging method (https://learn.microsoft.com/dotnet/fundamentals/syslib-diagnostics/syslib1014)

Check failure on line 235 in src/Localization/Localization/src/ResourceManagerStringLocalizer.cs

View check run for this annotation

Azure Pipelines / aspnetcore-ci (Build Build: macOS arm64)

src/Localization/Localization/src/ResourceManagerStringLocalizer.cs#L235

src/Localization/Localization/src/ResourceManagerStringLocalizer.cs(235,10): error SYSLIB1014: (NETCORE_ENGINEERING_TELEMETRY=Build) Template 'Culture' is not provided as argument to the logging method (https://learn.microsoft.com/dotnet/fundamentals/syslib-diagnostics/syslib1014)

Check failure on line 235 in src/Localization/Localization/src/ResourceManagerStringLocalizer.cs

View check run for this annotation

Azure Pipelines / aspnetcore-ci (Build Build: Linux Musl x64)

src/Localization/Localization/src/ResourceManagerStringLocalizer.cs#L235

src/Localization/Localization/src/ResourceManagerStringLocalizer.cs(235,10): error SYSLIB1014: (NETCORE_ENGINEERING_TELEMETRY=Build) Template 'Culture' is not provided as argument to the logging method (https://learn.microsoft.com/dotnet/fundamentals/syslib-diagnostics/syslib1014)

Check failure on line 235 in src/Localization/Localization/src/ResourceManagerStringLocalizer.cs

View check run for this annotation

Azure Pipelines / aspnetcore-ci (Build Build: Linux Musl x64)

src/Localization/Localization/src/ResourceManagerStringLocalizer.cs#L235

src/Localization/Localization/src/ResourceManagerStringLocalizer.cs(235,10): error SYSLIB1014: (NETCORE_ENGINEERING_TELEMETRY=Build) Template 'Culture' is not provided as argument to the logging method (https://learn.microsoft.com/dotnet/fundamentals/syslib-diagnostics/syslib1014)

Check failure on line 235 in src/Localization/Localization/src/ResourceManagerStringLocalizer.cs

View check run for this annotation

Azure Pipelines / aspnetcore-ci (Build Build: Linux Musl x64)

src/Localization/Localization/src/ResourceManagerStringLocalizer.cs#L235

src/Localization/Localization/src/ResourceManagerStringLocalizer.cs(235,10): error SYSLIB1014: (NETCORE_ENGINEERING_TELEMETRY=Build) Template 'Culture' is not provided as argument to the logging method (https://learn.microsoft.com/dotnet/fundamentals/syslib-diagnostics/syslib1014)

Check failure on line 235 in src/Localization/Localization/src/ResourceManagerStringLocalizer.cs

View check run for this annotation

Azure Pipelines / aspnetcore-ci (Build Build: Linux Musl ARM64)

src/Localization/Localization/src/ResourceManagerStringLocalizer.cs#L235

src/Localization/Localization/src/ResourceManagerStringLocalizer.cs(235,10): error SYSLIB1014: (NETCORE_ENGINEERING_TELEMETRY=Build) Template 'Culture' is not provided as argument to the logging method (https://learn.microsoft.com/dotnet/fundamentals/syslib-diagnostics/syslib1014)

Check failure on line 235 in src/Localization/Localization/src/ResourceManagerStringLocalizer.cs

View check run for this annotation

Azure Pipelines / aspnetcore-ci (Build Build: Linux Musl ARM64)

src/Localization/Localization/src/ResourceManagerStringLocalizer.cs#L235

src/Localization/Localization/src/ResourceManagerStringLocalizer.cs(235,10): error SYSLIB1014: (NETCORE_ENGINEERING_TELEMETRY=Build) Template 'Culture' is not provided as argument to the logging method (https://learn.microsoft.com/dotnet/fundamentals/syslib-diagnostics/syslib1014)

Check failure on line 235 in src/Localization/Localization/src/ResourceManagerStringLocalizer.cs

View check run for this annotation

Azure Pipelines / aspnetcore-ci (Build Build: Linux Musl ARM64)

src/Localization/Localization/src/ResourceManagerStringLocalizer.cs#L235

src/Localization/Localization/src/ResourceManagerStringLocalizer.cs(235,10): error SYSLIB1014: (NETCORE_ENGINEERING_TELEMETRY=Build) Template 'Culture' is not provided as argument to the logging method (https://learn.microsoft.com/dotnet/fundamentals/syslib-diagnostics/syslib1014)

Check failure on line 235 in src/Localization/Localization/src/ResourceManagerStringLocalizer.cs

View check run for this annotation

Azure Pipelines / aspnetcore-ci (Build Build: Linux ARM)

src/Localization/Localization/src/ResourceManagerStringLocalizer.cs#L235

src/Localization/Localization/src/ResourceManagerStringLocalizer.cs(235,10): error SYSLIB1014: (NETCORE_ENGINEERING_TELEMETRY=Build) Template 'Culture' is not provided as argument to the logging method (https://learn.microsoft.com/dotnet/fundamentals/syslib-diagnostics/syslib1014)

Check failure on line 235 in src/Localization/Localization/src/ResourceManagerStringLocalizer.cs

View check run for this annotation

Azure Pipelines / aspnetcore-ci (Build Build: Linux ARM)

src/Localization/Localization/src/ResourceManagerStringLocalizer.cs#L235

src/Localization/Localization/src/ResourceManagerStringLocalizer.cs(235,10): error SYSLIB1014: (NETCORE_ENGINEERING_TELEMETRY=Build) Template 'Culture' is not provided as argument to the logging method (https://learn.microsoft.com/dotnet/fundamentals/syslib-diagnostics/syslib1014)

Check failure on line 235 in src/Localization/Localization/src/ResourceManagerStringLocalizer.cs

View check run for this annotation

Azure Pipelines / aspnetcore-ci (Build Build: Linux ARM)

src/Localization/Localization/src/ResourceManagerStringLocalizer.cs#L235

src/Localization/Localization/src/ResourceManagerStringLocalizer.cs(235,10): error SYSLIB1014: (NETCORE_ENGINEERING_TELEMETRY=Build) Template 'Culture' is not provided as argument to the logging method (https://learn.microsoft.com/dotnet/fundamentals/syslib-diagnostics/syslib1014)

Check failure on line 235 in src/Localization/Localization/src/ResourceManagerStringLocalizer.cs

View check run for this annotation

Azure Pipelines / aspnetcore-ci (Build Build: macOS x64)

src/Localization/Localization/src/ResourceManagerStringLocalizer.cs#L235

src/Localization/Localization/src/ResourceManagerStringLocalizer.cs(235,10): error SYSLIB1014: (NETCORE_ENGINEERING_TELEMETRY=Build) Template 'Culture' is not provided as argument to the logging method (https://learn.microsoft.com/dotnet/fundamentals/syslib-diagnostics/syslib1014)

Check failure on line 235 in src/Localization/Localization/src/ResourceManagerStringLocalizer.cs

View check run for this annotation

Azure Pipelines / aspnetcore-ci (Build Build: macOS x64)

src/Localization/Localization/src/ResourceManagerStringLocalizer.cs#L235

src/Localization/Localization/src/ResourceManagerStringLocalizer.cs(235,10): error SYSLIB1014: (NETCORE_ENGINEERING_TELEMETRY=Build) Template 'Culture' is not provided as argument to the logging method (https://learn.microsoft.com/dotnet/fundamentals/syslib-diagnostics/syslib1014)

Check failure on line 235 in src/Localization/Localization/src/ResourceManagerStringLocalizer.cs

View check run for this annotation

Azure Pipelines / aspnetcore-ci (Build Build: macOS x64)

src/Localization/Localization/src/ResourceManagerStringLocalizer.cs#L235

src/Localization/Localization/src/ResourceManagerStringLocalizer.cs(235,10): error SYSLIB1014: (NETCORE_ENGINEERING_TELEMETRY=Build) Template 'Culture' is not provided as argument to the logging method (https://learn.microsoft.com/dotnet/fundamentals/syslib-diagnostics/syslib1014)

Check failure on line 235 in src/Localization/Localization/src/ResourceManagerStringLocalizer.cs

View check run for this annotation

Azure Pipelines / aspnetcore-quarantined-pr (Tests: Ubuntu x64)

src/Localization/Localization/src/ResourceManagerStringLocalizer.cs#L235

src/Localization/Localization/src/ResourceManagerStringLocalizer.cs(235,10): error SYSLIB1014: (NETCORE_ENGINEERING_TELEMETRY=Build) Template 'Culture' is not provided as argument to the logging method (https://learn.microsoft.com/dotnet/fundamentals/syslib-diagnostics/syslib1014)

Check failure on line 235 in src/Localization/Localization/src/ResourceManagerStringLocalizer.cs

View check run for this annotation

Azure Pipelines / aspnetcore-quarantined-pr (Tests: Ubuntu x64)

src/Localization/Localization/src/ResourceManagerStringLocalizer.cs#L235

src/Localization/Localization/src/ResourceManagerStringLocalizer.cs(235,10): error SYSLIB1014: (NETCORE_ENGINEERING_TELEMETRY=Build) Template 'Culture' is not provided as argument to the logging method (https://learn.microsoft.com/dotnet/fundamentals/syslib-diagnostics/syslib1014)

Check failure on line 235 in src/Localization/Localization/src/ResourceManagerStringLocalizer.cs

View check run for this annotation

Azure Pipelines / aspnetcore-ci (Build Test: Ubuntu x64)

src/Localization/Localization/src/ResourceManagerStringLocalizer.cs#L235

src/Localization/Localization/src/ResourceManagerStringLocalizer.cs(235,10): error SYSLIB1014: (NETCORE_ENGINEERING_TELEMETRY=Build) Template 'Culture' is not provided as argument to the logging method (https://learn.microsoft.com/dotnet/fundamentals/syslib-diagnostics/syslib1014)

Check failure on line 235 in src/Localization/Localization/src/ResourceManagerStringLocalizer.cs

View check run for this annotation

Azure Pipelines / aspnetcore-ci (Build Test: Ubuntu x64)

src/Localization/Localization/src/ResourceManagerStringLocalizer.cs#L235

src/Localization/Localization/src/ResourceManagerStringLocalizer.cs(235,10): error SYSLIB1014: (NETCORE_ENGINEERING_TELEMETRY=Build) Template 'Culture' is not provided as argument to the logging method (https://learn.microsoft.com/dotnet/fundamentals/syslib-diagnostics/syslib1014)

Check failure on line 235 in src/Localization/Localization/src/ResourceManagerStringLocalizer.cs

View check run for this annotation

Azure Pipelines / aspnetcore-ci (Build Test: Ubuntu x64)

src/Localization/Localization/src/ResourceManagerStringLocalizer.cs#L235

src/Localization/Localization/src/ResourceManagerStringLocalizer.cs(235,10): error SYSLIB1014: (NETCORE_ENGINEERING_TELEMETRY=Build) Template 'Culture' is not provided as argument to the logging method (https://learn.microsoft.com/dotnet/fundamentals/syslib-diagnostics/syslib1014)

Check failure on line 235 in src/Localization/Localization/src/ResourceManagerStringLocalizer.cs

View check run for this annotation

Azure Pipelines / aspnetcore-quarantined-pr (Tests: macOS)

src/Localization/Localization/src/ResourceManagerStringLocalizer.cs#L235

src/Localization/Localization/src/ResourceManagerStringLocalizer.cs(235,10): error SYSLIB1014: (NETCORE_ENGINEERING_TELEMETRY=Build) Template 'Culture' is not provided as argument to the logging method (https://learn.microsoft.com/dotnet/fundamentals/syslib-diagnostics/syslib1014)

Check failure on line 235 in src/Localization/Localization/src/ResourceManagerStringLocalizer.cs

View check run for this annotation

Azure Pipelines / aspnetcore-quarantined-pr (Tests: macOS)

src/Localization/Localization/src/ResourceManagerStringLocalizer.cs#L235

src/Localization/Localization/src/ResourceManagerStringLocalizer.cs(235,10): error SYSLIB1014: (NETCORE_ENGINEERING_TELEMETRY=Build) Template 'Culture' is not provided as argument to the logging method (https://learn.microsoft.com/dotnet/fundamentals/syslib-diagnostics/syslib1014)

Check failure on line 235 in src/Localization/Localization/src/ResourceManagerStringLocalizer.cs

View check run for this annotation

Azure Pipelines / aspnetcore-quarantined-pr (Tests: macOS)

src/Localization/Localization/src/ResourceManagerStringLocalizer.cs#L235

src/Localization/Localization/src/ResourceManagerStringLocalizer.cs(235,10): error SYSLIB1014: (NETCORE_ENGINEERING_TELEMETRY=Build) Template 'Culture' is not provided as argument to the logging method (https://learn.microsoft.com/dotnet/fundamentals/syslib-diagnostics/syslib1014)

Check failure on line 235 in src/Localization/Localization/src/ResourceManagerStringLocalizer.cs

View check run for this annotation

Azure Pipelines / aspnetcore-ci (Build Test: macOS)

src/Localization/Localization/src/ResourceManagerStringLocalizer.cs#L235

src/Localization/Localization/src/ResourceManagerStringLocalizer.cs(235,10): error SYSLIB1014: (NETCORE_ENGINEERING_TELEMETRY=Build) Template 'Culture' is not provided as argument to the logging method (https://learn.microsoft.com/dotnet/fundamentals/syslib-diagnostics/syslib1014)

Check failure on line 235 in src/Localization/Localization/src/ResourceManagerStringLocalizer.cs

View check run for this annotation

Azure Pipelines / aspnetcore-ci (Build Test: macOS)

src/Localization/Localization/src/ResourceManagerStringLocalizer.cs#L235

src/Localization/Localization/src/ResourceManagerStringLocalizer.cs(235,10): error SYSLIB1014: (NETCORE_ENGINEERING_TELEMETRY=Build) Template 'Culture' is not provided as argument to the logging method (https://learn.microsoft.com/dotnet/fundamentals/syslib-diagnostics/syslib1014)

Check failure on line 235 in src/Localization/Localization/src/ResourceManagerStringLocalizer.cs

View check run for this annotation

Azure Pipelines / aspnetcore-ci (Build Test: macOS)

src/Localization/Localization/src/ResourceManagerStringLocalizer.cs#L235

src/Localization/Localization/src/ResourceManagerStringLocalizer.cs(235,10): error SYSLIB1014: (NETCORE_ENGINEERING_TELEMETRY=Build) Template 'Culture' is not provided as argument to the logging method (https://learn.microsoft.com/dotnet/fundamentals/syslib-diagnostics/syslib1014)

Check failure on line 235 in src/Localization/Localization/src/ResourceManagerStringLocalizer.cs

View check run for this annotation

Azure Pipelines / aspnetcore-quarantined-pr

src/Localization/Localization/src/ResourceManagerStringLocalizer.cs#L235

src/Localization/Localization/src/ResourceManagerStringLocalizer.cs(235,10): error SYSLIB1014: (NETCORE_ENGINEERING_TELEMETRY=Build) Template 'Culture' is not provided as argument to the logging method (https://learn.microsoft.com/dotnet/fundamentals/syslib-diagnostics/syslib1014)

Check failure on line 235 in src/Localization/Localization/src/ResourceManagerStringLocalizer.cs

View check run for this annotation

Azure Pipelines / aspnetcore-quarantined-pr

src/Localization/Localization/src/ResourceManagerStringLocalizer.cs#L235

src/Localization/Localization/src/ResourceManagerStringLocalizer.cs(235,10): error SYSLIB1014: (NETCORE_ENGINEERING_TELEMETRY=Build) Template 'Culture' is not provided as argument to the logging method (https://learn.microsoft.com/dotnet/fundamentals/syslib-diagnostics/syslib1014)

Check failure on line 235 in src/Localization/Localization/src/ResourceManagerStringLocalizer.cs

View check run for this annotation

Azure Pipelines / aspnetcore-ci

src/Localization/Localization/src/ResourceManagerStringLocalizer.cs#L235

src/Localization/Localization/src/ResourceManagerStringLocalizer.cs(235,10): error SYSLIB1014: (NETCORE_ENGINEERING_TELEMETRY=Build) Template 'Culture' is not provided as argument to the logging method (https://learn.microsoft.com/dotnet/fundamentals/syslib-diagnostics/syslib1014)

Check failure on line 235 in src/Localization/Localization/src/ResourceManagerStringLocalizer.cs

View check run for this annotation

Azure Pipelines / aspnetcore-ci

src/Localization/Localization/src/ResourceManagerStringLocalizer.cs#L235

src/Localization/Localization/src/ResourceManagerStringLocalizer.cs(235,10): error SYSLIB1014: (NETCORE_ENGINEERING_TELEMETRY=Build) Template 'Culture' is not provided as argument to the logging method (https://learn.microsoft.com/dotnet/fundamentals/syslib-diagnostics/syslib1014)
public static partial void ResourceNotFound(ILogger logger, string key);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -136,8 +136,10 @@ public void GetString_LogsLocationSearched()
var value = localizer["a key!"];

// Assert
var write = Assert.Single(Sink.Writes);
Assert.Equal("ResourceManagerStringLocalizer searched for 'a key!' in 'Resources.TestResource' with culture 'en-US'.", write.State.ToString());
var write = Sink.Writes;
Assert.Equal(2, write.Count);
Assert.Equal("ResourceManagerStringLocalizer searched for 'a key!' in 'Resources.TestResource' with culture 'en-US'.", write.ElementAt(0).State.ToString());
Assert.Equal("The resource with key 'a key!' is found.", write.ElementAt(1).State.ToString());
}

[Theory]
Expand Down
Loading