Crated basic file upload method; also included appsettings and feauture-management

This commit is contained in:
schnulller
2022-06-02 03:19:04 +02:00
parent 34a4fccc91
commit d81eb942e7
21 changed files with 790 additions and 158 deletions

View File

@@ -1,6 +1,7 @@
using HaXMLReader;
using HaXMLReader.Interfaces;
using HaDocument.Interfaces;
using Microsoft.FeatureManagement;
var builder = WebApplication.CreateBuilder(args);
@@ -9,6 +10,7 @@ builder.Services.AddControllersWithViews();
builder.Services.AddHttpContextAccessor();
builder.Services.AddSingleton<ILibrary>(x => HaDocument.Document.Create(new Options()));
builder.Services.AddTransient<IReaderService, ReaderService>();
builder.Services.AddFeatureManagement();
// builder.Services.AddWebOptimizer();
@@ -26,10 +28,11 @@ if (!app.Environment.IsDevelopment())
// app.UseWebOptimizer();
app.UseAuthorization();
app.UseStaticFiles();
app.UseRouting();
app.MapControllers();
app.Run();
class Options : IHaDocumentOptions {
public string HamannXMLFilePath { get; set; } = HaWeb.Settings.General.XMLFILEPATH;
public string[] AvailableVolumes { get; set; } = HaWeb.Settings.General.AVAILABLEVOLUMES;