LearnChineseSimplified/LearningChineseFixed/Client/Program.cs

31 lines
1.1 KiB
C#

using LearningChineseFixed;
using Microsoft.AspNetCore.Components.Web;
using Microsoft.AspNetCore.Components.WebAssembly.Hosting;
using MudBlazor;
using Blazored.LocalStorage;
using MudBlazor.Services;
namespace LearningChineseFixed
{
public class Program
{
public static async Task Main(string[] args)
{
var builder = WebAssemblyHostBuilder.CreateDefault(args);
builder.RootComponents.Add<App>("#app");
builder.RootComponents.Add<HeadOutlet>("head::after");
builder.Services.AddScoped(sp => new HttpClient { BaseAddress = new Uri(builder.HostEnvironment.BaseAddress) });
builder.Services.AddMudServices(config =>
{
config.SnackbarConfiguration.ShowTransitionDuration = 100;
config.SnackbarConfiguration.HideTransitionDuration = 100;
config.SnackbarConfiguration.VisibleStateDuration = 3000;
config.SnackbarConfiguration.PositionClass = Defaults.Classes.Position.BottomCenter;
});
builder.Services.AddBlazoredLocalStorage();
await builder.Build().RunAsync();
}
}
}