1 instantiation of ResourceManagerStringLocalizer
Microsoft.Extensions.Localization (1)
ResourceManagerStringLocalizerFactory.cs (1)
171
return new
ResourceManagerStringLocalizer
(
30 references to ResourceManagerStringLocalizer
Microsoft.Extensions.Localization (16)
ResourceManagerStringLocalizer.cs (2)
31
/// Creates a new <see cref="
ResourceManagerStringLocalizer
"/>.
222
[LoggerMessage(1, LogLevel.Debug, $"{nameof(
ResourceManagerStringLocalizer
)} searched for '{{Key}}' in '{{LocationSearched}}' with culture '{{Culture}}'.", EventName = "SearchedLocation")]
ResourceManagerStringLocalizerFactory.cs (14)
16
/// An <see cref="IStringLocalizerFactory"/> that creates instances of <see cref="
ResourceManagerStringLocalizer
"/>.
26
private readonly ConcurrentDictionary<string,
ResourceManagerStringLocalizer
> _localizerCache =
27
new ConcurrentDictionary<string,
ResourceManagerStringLocalizer
>();
32
/// Creates a new <see cref="
ResourceManagerStringLocalizer
"/>.
117
/// Creates a <see cref="
ResourceManagerStringLocalizer
"/> using the <see cref="Assembly"/> and
121
/// <returns>The <see cref="
ResourceManagerStringLocalizer
"/>.</returns>
127
if (!_localizerCache.TryGetValue(resourceSource.AssemblyQualifiedName!, out
var
localizer))
142
/// Creates a <see cref="
ResourceManagerStringLocalizer
"/>.
146
/// <returns>The <see cref="
ResourceManagerStringLocalizer
"/>.</returns>
162
/// <summary>Creates a <see cref="
ResourceManagerStringLocalizer
"/> for the given input.</summary>
163
/// <param name="assembly">The assembly to create a <see cref="
ResourceManagerStringLocalizer
"/> for.</param>
165
/// <returns>A <see cref="
ResourceManagerStringLocalizer
"/> for the given <paramref name="assembly"/> and <paramref name="baseName"/>.</returns>
167
protected virtual
ResourceManagerStringLocalizer
CreateResourceManagerStringLocalizer(
176
_loggerFactory.CreateLogger<
ResourceManagerStringLocalizer
>());
Microsoft.Extensions.Localization.Tests (14)
ResourceManagerStringLocalizerFactoryTest.cs (4)
48
protected override
ResourceManagerStringLocalizer
CreateResourceManagerStringLocalizer(Assembly assembly, string baseName)
215
var location = typeof(
ResourceManagerStringLocalizer
).Assembly.FullName;
234
var location = typeof(
ResourceManagerStringLocalizer
).Assembly.FullName;
253
var location1 = new AssemblyName(typeof(
ResourceManagerStringLocalizer
).Assembly.FullName).Name;
ResourceManagerStringLocalizerTest.cs (10)
33
var
localizer1 = new ResourceManagerStringLocalizer(resourceManager,
38
var
localizer2 = new ResourceManagerStringLocalizer(resourceManager,
63
var resourceAssembly2 = new TestAssemblyWrapper(typeof(
ResourceManagerStringLocalizer
));
69
var
localizer1 = new ResourceManagerStringLocalizer(
75
var
localizer2 = new ResourceManagerStringLocalizer(
102
var
localizer = new ResourceManagerStringLocalizer(
128
var
localizer = new ResourceManagerStringLocalizer(
155
var
localizer = new ResourceManagerStringLocalizer(
186
var
localizer = new ResourceManagerStringLocalizer(
247
private ILogger Logger => new TestLoggerFactory(Sink, enabled: true).CreateLogger<
ResourceManagerStringLocalizer
>();