Open Source Web Application Framework for ASP.NET Core
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

18 lines
604 B

namespace Microsoft.Extensions.Localization;
public static class AbpStringLocalizerFactoryExtensions
{
public static IStringLocalizer CreateDefaultOrNull(this IStringLocalizerFactory localizerFactory)
{
return (localizerFactory as IAbpStringLocalizerFactory)
?.CreateDefaultOrNull();
}
public static IStringLocalizer CreateByResourceNameOrNull(
this IStringLocalizerFactory localizerFactory,
string resourceName)
{
return (localizerFactory as IAbpStringLocalizerFactory)
?.CreateByResourceNameOrNull(resourceName);
}
}