This commit is contained in:
2026-01-23 09:57:52 +01:00
commit 831badd188
136 changed files with 7705 additions and 0 deletions

49
PdfMarker/Program.cs Normal file
View File

@ -0,0 +1,49 @@
using Microsoft.AspNetCore.Components;
using PdfMarker.Components;
using PdfMarker.Services;
using Radzen;
var builder = WebApplication.CreateBuilder(args);
// Add services to the container.
builder.Services.AddRazorComponents()
.AddInteractiveServerComponents()
.AddInteractiveWebAssemblyComponents();
builder.Services.AddRadzenComponents();
builder.Services.AddControllers();
builder.Services.AddScoped<PdfStorageService>();
builder.Services.AddScoped<PdfQuotaExtractor>();
builder.Services.AddScoped<QuotaClusterer>();
builder.Services.AddScoped<PdfTextExtractor>();
builder.Services.AddScoped<BallooningService>();
builder.Services.AddScoped<HttpClient>(sp =>
{
var nav = sp.GetRequiredService<NavigationManager>();
return new HttpClient
{
BaseAddress = new Uri(nav.BaseUri)
};
});
var app = builder.Build();
// Configure the HTTP request pipeline.
if (!app.Environment.IsDevelopment())
{
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.UseHttpsRedirection();
app.UseStaticFiles();
app.UseAntiforgery();
app.MapControllers();
app.MapRazorComponents<App>()
.AddInteractiveServerRenderMode()
.AddInteractiveWebAssemblyRenderMode();
app.Run();