44 lines
1.1 KiB
C#
44 lines
1.1 KiB
C#
using AOW4;
|
|
using AOW4.Components;
|
|
using AOW4.Services;
|
|
using MudBlazor.Services;
|
|
using _Imports = AOW4.Client._Imports;
|
|
|
|
var builder = WebApplication.CreateBuilder(args);
|
|
|
|
// Add services to the container.
|
|
builder.Services.AddRazorComponents()
|
|
.AddInteractiveWebAssemblyComponents();
|
|
|
|
builder.Services.AddScoped<IToastService, ToastService>();
|
|
builder.Services.AddScoped<IMyDialogService, MyDialogService>();
|
|
|
|
builder.Services.AddMudServices();
|
|
|
|
|
|
|
|
var app = builder.Build();
|
|
|
|
// Configure the HTTP request pipeline.
|
|
if (app.Environment.IsDevelopment())
|
|
{
|
|
app.UseWebAssemblyDebugging();
|
|
}
|
|
else
|
|
{
|
|
app.UseExceptionHandler("/Error", true);
|
|
// The default HSTS value is 30 days. You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts.
|
|
app.UseHsts();
|
|
}
|
|
|
|
app.UseStatusCodePagesWithReExecute("/not-found", createScopeForStatusCodePages: true);
|
|
app.UseHttpsRedirection();
|
|
|
|
app.UseAntiforgery();
|
|
|
|
app.MapStaticAssets();
|
|
app.MapRazorComponents<App>()
|
|
.AddInteractiveWebAssemblyRenderMode()
|
|
.AddAdditionalAssemblies(typeof(_Imports).Assembly);
|
|
|
|
app.Run(); |