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;
|
2022-05-29 12:44:27 +03:00
|
|
|
|
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
|
|
|
|
|
2020-05-28 19:33:49 +03:00
|
|
|
|
namespace AntDesign.Docs.Wasm
|
2019-12-04 11:46:08 +03:00
|
|
|
|
{
|
|
|
|
|
public class Program
|
|
|
|
|
{
|
2020-02-15 13:22:51 +03:00
|
|
|
|
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");
|
|
|
|
|
}
|
|
|
|
|
|
2020-02-15 13:22:51 +03:00
|
|
|
|
var builder = WebAssemblyHostBuilder.CreateDefault(args);
|
2020-03-11 13:45:37 +03:00
|
|
|
|
builder.RootComponents.Add<App>("app");
|
2022-05-29 12:44:27 +03:00
|
|
|
|
builder.RootComponents.Add<HeadOutlet>("head::after");
|
2020-02-15 13:22:51 +03:00
|
|
|
|
|
2020-04-24 05:34:54 +03:00
|
|
|
|
builder.Services.AddTransient(sp => new HttpClient { BaseAddress = new Uri(builder.HostEnvironment.BaseAddress) });
|
|
|
|
|
|
2020-05-28 19:33:49 +03:00
|
|
|
|
builder.Services.AddAntDesignDocs();
|
2019-12-04 11:46:08 +03:00
|
|
|
|
|
2020-02-15 13:22:51 +03:00
|
|
|
|
await builder.Build().RunAsync();
|
|
|
|
|
}
|
2019-12-04 11:46:08 +03:00
|
|
|
|
}
|
2020-04-24 05:34:54 +03:00
|
|
|
|
}
|