修改可空类型

This commit is contained in:
陈淳
2023-01-06 10:15:37 +08:00
parent b7c9b84449
commit 576397a042
29 changed files with 82 additions and 68 deletions

View File

@@ -22,7 +22,7 @@ namespace Yi.Framework.WebCore.AspNetCoreExtensions
public static void UseLocalizerService(this IApplicationBuilder app)
{
Result._local = app.ApplicationServices.GetService<IStringLocalizer<LocalLanguage>>();
Result._local = app.ApplicationServices.GetRequiredService<IStringLocalizer<LocalLanguage>>();
var support = new[] { "zh", "en" };
var local = new RequestLocalizationOptions().SetDefaultCulture(support[0])