дзеркало
https://github.com/l0ng-ai/openidea.git
синхронізовано 2026-12-04 17:21:13 +02:00
Razor (.cshtml/.razor) gets syntax highlighting, Roslyn's built-in Razor support with the HTML parts projected to the HTML language server (ordered open/close, a reserved projection URI, scoped capability registrations), and MVC navigation between controller actions and their views, including explicit View("...") names, subfolders and areas.
Closes #615
Co-authored-by: GlitchedPolygons <[email protected]>
23 рядки
614 B
C#
23 рядки
614 B
C#
var builder = WebApplication.CreateBuilder(args);
|
|
|
|
builder.Services.AddControllersWithViews();
|
|
builder.Services.AddRazorPages();
|
|
// Renders the components in Components/ from views with the <component> tag helper.
|
|
builder.Services.AddRazorComponents();
|
|
|
|
var app = builder.Build();
|
|
|
|
if (!app.Environment.IsDevelopment())
|
|
{
|
|
app.UseExceptionHandler("/Home/Error");
|
|
}
|
|
|
|
app.UseStaticFiles();
|
|
app.UseRouting();
|
|
|
|
app.MapControllerRoute("areas", "{area:exists}/{controller=Dashboard}/{action=Index}/{id?}");
|
|
app.MapControllerRoute("default", "{controller=Home}/{action=Index}/{id?}");
|
|
app.MapRazorPages();
|
|
|
|
app.Run();
|