ant-design-blazor/tests/AntDesign.TestApp/Client/Program.cs
Guyiming cc836bcf10 feat(module: tabs): Add AuthorizeReuseTabsRouteView (#1910)
* 使MenItem同时支持Icon和IconFont,解决当使用iconfont.cn图标后,缩起内嵌菜单导致按钮样式不统一的问题。

* 空值判断

* add IconTemplate in MenuItem

* code format

* Add AuthorizeReuseTabsRouteView

* add readme.md

* remove comments

* Add AuthorizeResuseTabsRouteView test demo

* save

* save

* done

* refactor the test app

* fix test app

* debug

* debug

* fix tab render

* fix the copyright

* fix package infomation

* fix tab display order

* fix content focerender

Co-authored-by: BG345554 <ymgu@best-inc.com>
Co-authored-by: James Yeung <shunjiey@hotmail.com>
2021-10-11 23:01:27 +08:00

35 lines
1.2 KiB
C#

using Microsoft.AspNetCore.Components.WebAssembly.Authentication;
using Microsoft.AspNetCore.Components.WebAssembly.Hosting;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;
using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Text;
using System.Threading.Tasks;
namespace AntDesign.TestApp.Client
{
public class Program
{
public static async Task Main(string[] args)
{
var builder = WebAssemblyHostBuilder.CreateDefault(args);
builder.RootComponents.Add<App>("#app");
builder.Services.AddHttpClient("AntDesign.TestApp.ServerAPI", client => client.BaseAddress = new Uri(builder.HostEnvironment.BaseAddress))
.AddHttpMessageHandler<BaseAddressAuthorizationMessageHandler>();
// Supply HttpClient instances that include access tokens when making requests to the server project
builder.Services.AddScoped(sp => sp.GetRequiredService<IHttpClientFactory>().CreateClient("AntDesign.TestApp.ServerAPI"));
builder.Services.AddApiAuthorization();
builder.Services.AddAntDesign();
await builder.Build().RunAsync();
}
}
}