ant-design-blazor/site/AntBlazor.Docs.Wasm/Program.cs
2020-04-24 10:34:54 +08:00

24 lines
670 B
C#

using System;
using System.Net.Http;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Components.WebAssembly.Hosting;
using Microsoft.Extensions.DependencyInjection;
namespace AntBlazor.Docs.Wasm
{
public class Program
{
public static async Task Main(string[] args)
{
var builder = WebAssemblyHostBuilder.CreateDefault(args);
builder.RootComponents.Add<App>("app");
builder.Services.AddTransient(sp => new HttpClient { BaseAddress = new Uri(builder.HostEnvironment.BaseAddress) });
builder.Services.AddAntBlazorDocs();
await builder.Build().RunAsync();
}
}
}