ant-design-blazor/site/AntDesign.Docs.Wasm/Program.cs

33 строки
1.1 KiB
C#
Исходник Обычный вид История

2020-04-24 05:34:54 +03:00
using System;
2022-11-16 12:23:29 +03:00
using System.Globalization;
2020-04-24 05:34:54 +03:00
using System.Net.Http;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Components.Web;
2020-03-11 13:45:37 +03:00
using Microsoft.AspNetCore.Components.WebAssembly.Hosting;
using Microsoft.Extensions.DependencyInjection;
2019-12-04 11:46:08 +03:00
namespace AntDesign.Docs.Wasm
2019-12-04 11:46:08 +03:00
{
public class Program
{
public static async Task Main(string[] args)
2019-12-04 11:46:08 +03:00
{
2022-11-16 12:23:29 +03:00
if (!CultureInfo.CurrentCulture.Name.IsIn("en-US", "zh-CN"))
{
CultureInfo.CurrentCulture = CultureInfo.GetCultureInfo("en-US");
CultureInfo.CurrentUICulture = CultureInfo.GetCultureInfo("en-US");
}
var builder = WebAssemblyHostBuilder.CreateDefault(args);
2020-03-11 13:45:37 +03:00
builder.RootComponents.Add<App>("app");
builder.RootComponents.Add<HeadOutlet>("head::after");
2020-04-24 05:34:54 +03:00
builder.Services.AddTransient(sp => new HttpClient { BaseAddress = new Uri(builder.HostEnvironment.BaseAddress) });
builder.Services.AddAntDesignDocs();
2019-12-04 11:46:08 +03:00
await builder.Build().RunAsync();
}
2019-12-04 11:46:08 +03:00
}
2020-04-24 05:34:54 +03:00
}