34 lines
814 B
C#
34 lines
814 B
C#
namespace CloudGaming.Core.Razor;
|
|
|
|
/// <summary>
|
|
///
|
|
/// </summary>
|
|
public class CoreRazorStartup : StartupModule<CoreRazorStartup>
|
|
{
|
|
/// <summary>
|
|
///
|
|
/// </summary>
|
|
/// <param name="webApplicationBuilder"></param>
|
|
public override void ConfigureServices(WebApplicationBuilder webApplicationBuilder)
|
|
{
|
|
var services = webApplicationBuilder.Services;
|
|
|
|
// 代码生成器需要开启 razor page 引擎
|
|
webApplicationBuilder.Services.AddRazorPages();
|
|
// razor 解决中文被编码
|
|
webApplicationBuilder.Services.AddSingleton(HtmlEncoder.Create(UnicodeRanges.All));
|
|
}
|
|
|
|
/// <summary>
|
|
///
|
|
/// </summary>
|
|
/// <param name="webApplication"></param>
|
|
public override void Configure(WebApplication webApplication)
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|