Ported libs fo net V6

This commit is contained in:
schnulller
2022-05-17 01:21:10 +02:00
parent cb23a75761
commit 2ffd46cd62
79 changed files with 225299 additions and 124 deletions

View File

@@ -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);
}