/
githubmirror
/
aspnetcore
Обзор
Документация
Войти
/
githubmirror
/
aspnetcore
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
src/Components/Samples/BlazorWebAppPerPage/Program.cs
40 строк
1 KB
Javier Calvarro Nelson
[Blazor] Revamp Components Blazor samples + add validate-blazor-feature skill (#67497)
28 июл 2026, 18:30
Не верифицирован
28 июл 2026, 18:30
38cef4b
Код
Авторство
О чём код?
// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. using BlazorWebAppPerPage.Client.Pages; using BlazorWebAppPerPage.Components; var builder = WebApplication.CreateBuilder(args); // Add services to the container. builder.Services.AddRazorComponents() .AddInteractiveServerComponents() .AddInteractiveWebAssemblyComponents(); var app = builder.Build(); // Configure the HTTP request pipeline. if (app.Environment.IsDevelopment()) { #pragma warning disable ASPDEPR011 // UseWebAssemblyDebugging is obsolete app.UseWebAssemblyDebugging(); #pragma warning restore ASPDEPR011 } else { app.UseExceptionHandler("/Error", createScopeForErrors: 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>() .AddInteractiveServerRenderMode() .AddInteractiveWebAssemblyRenderMode() .AddAdditionalAssemblies(typeof(BlazorWebAppPerPage.Client._Imports).Assembly); app.Run();