1 implementation of Create
Microsoft.Extensions.Localization (1)
ResourceManagerStringLocalizerFactory.cs (1)
122public IStringLocalizer Create(Type resourceSource)
32 references to Create
LocalizationWebsite (2)
StartupResourcesInClassLibrary.cs (2)
36var noAttributeStringLocalizer = stringLocalizerFactory.Create(typeof(ResourcesClassLibraryNoAttribute.Model)); 37var withAttributeStringLocalizer = stringLocalizerFactory.Create(typeof(Alternate.Namespace.Model));
Microsoft.AspNetCore.Mvc.Core.TestCommon (2)
TestModelMetadataProvider.cs (1)
19localizationOptions.Value.DataAnnotationLocalizerProvider = (modelType, localizerFactory) => localizerFactory.Create(modelType);
TestModelValidatorProvider.cs (1)
16options.Value.DataAnnotationLocalizerProvider = (modelType, localizerFactory) => localizerFactory.Create(modelType);
Microsoft.AspNetCore.Mvc.DataAnnotations (1)
DependencyInjection\MvcDataAnnotationsLocalizationOptionsSetup.cs (1)
20stringLocalizerFactory.Create(modelType);
Microsoft.AspNetCore.Mvc.DataAnnotations.Test (15)
DataAnnotationsMetadataProviderTest.cs (15)
265.Setup(s => s.Create(typeof(EmptyClass))) 271return stringLocalizerFactory.Create(typeof(EmptyClass)); 303.Setup(s => s.Create(typeof(EmptyClass))) 309return stringLocalizerFactory.Create(typeof(EmptyClass)); 335.Setup(s => s.Create(typeof(EmptyClass))) 343return stringLocalizerFactory.Create(typeof(EmptyClass)); 403.Setup(s => s.Create(It.IsAny<Type>())) 438.Setup(s => s.Create(It.IsAny<Type>())) 502.Setup(s => s.Create(It.IsAny<Type>())) 574.Setup(f => f.Create(It.IsAny<Type>())) 579return stringLocalizerFactory.Create(type); 841.Setup(f => f.Create(It.IsAny<Type>())) 845localizationOptions.DataAnnotationLocalizerProvider = (modelType, stringLocalizerFactory) => stringLocalizerFactory.Create(modelType); 1718.Setup(factory => factory.Create(typeof(EnumWithLocalizedDisplayNames))) 1722localizationOptions.DataAnnotationLocalizerProvider = (modelType, localizerFactory) => localizerFactory.Create(modelType);
Microsoft.AspNetCore.Mvc.IntegrationTests (1)
TestMvcOptions.cs (1)
28.Setup(s => s.Create(It.IsAny<Type>()))
Microsoft.AspNetCore.Mvc.Localization (1)
HtmlLocalizerFactory.cs (1)
36return new HtmlLocalizer(_factory.Create(resourceSource));
Microsoft.AspNetCore.Mvc.ViewFeatures.Test (2)
Rendering\HtmlHelperDisplayExtensionsTest.cs (1)
340.Setup(s => s.Create(typeof(Status)))
Rendering\HtmlHelperSelectTest.cs (1)
1309.Setup(s => s.Create(It.IsAny<Type>()))
Microsoft.Extensions.Localization.Abstractions (1)
StringLocalizerOfT.cs (1)
26_localizer = factory.Create(typeof(TResourceSource));
Microsoft.Extensions.Localization.Tests (6)
StringLocalizerOfTTest.cs (6)
32factory.Verify(mock => mock.Create(typeof(object)), Times.Once()); 41factory.Setup(mock => mock.Create(typeof(object))) 58factory.Setup(mock => mock.Create(typeof(object))) 76factory.Setup(mock => mock.Create(typeof(object))) 93factory.Setup(mock => mock.Create(typeof(object))) 111factory.Setup(mock => mock.Create(typeof(object)))
RazorWebSite (1)
StartupDataAnnotations.cs (1)
22(modelType, stringLocalizerFactory) => stringLocalizerFactory.Create(typeof(SingleType));