mirror of
https://github.com/Theodor-Springmann-Stiftung/hamann-ausgabe-core.git
synced 2025-10-29 09:15:33 +00:00
Ported libs fo net V6
This commit is contained in:
@@ -1,8 +1,15 @@
|
||||
using HaXMLReader;
|
||||
using HaXMLReader.Interfaces;
|
||||
using HaDocument.Interfaces;
|
||||
|
||||
var builder = WebApplication.CreateBuilder(args);
|
||||
|
||||
// Add services to the container.
|
||||
builder.Services.AddControllersWithViews();
|
||||
builder.Services.AddHttpContextAccessor();
|
||||
builder.Services.AddSingleton<ILibrary>(x => HaDocument.Document.Create(new Options()));
|
||||
builder.Services.AddTransient<IReaderService, ReaderService>();
|
||||
|
||||
// builder.Services.AddWebOptimizer();
|
||||
|
||||
var app = builder.Build();
|
||||
@@ -22,3 +29,10 @@ app.UseStaticFiles();
|
||||
app.UseRouting();
|
||||
app.MapControllers();
|
||||
app.Run();
|
||||
|
||||
class Options : IHaDocumentOptions {
|
||||
public string HamannXMLFilePath { get; set; } = @"Hamann.xml";
|
||||
public string[] AvailableVolumes { get; set; } = { };
|
||||
public bool NormalizeWhitespace { get; set; } = true;
|
||||
public (int, int) AvailableYearRange {get; set; } = (1751, 1788);
|
||||
}
|
||||
Reference in New Issue
Block a user