LANCommander/LANCommander.Server/Startup/Services.cs
Pat Hartl 6ec919d1be Separate import and export functionality
This refactor splits the import and export functionality out of the ImportContext and adds an ExportContext. This also introduced separate importer and exporter implementations.

Additionally, adding archive, save, scripts, and server files to the final export archive has been implemented at the exporter implementation for each instead of handling it in the context. This should be a good pattern if other files need to be added down the road.
2025-07-27 17:51:50 -05:00

30 lines
No EOL
973 B
C#

using LANCommander.Server.ImportExport.Extensions;
using LANCommander.Server.Providers;
using LANCommander.Server.Services;
using LANCommander.Server.Services.Abstractions;
using LANCommander.Server.Services.Extensions;
using LANCommander.Server.Services.Models;
using LANCommander.UI.Extensions;
using Serilog;
namespace LANCommander.Server.Startup;
public static class Services
{
public static WebApplicationBuilder AddLANCommanderServices(this WebApplicationBuilder builder, Settings settings)
{
Log.Debug("Registering services");
builder.Services.AddLANCommanderServer(settings);
builder.Services.AddLANCommanderImportExport();
builder.Services.AddLANCommanderUI();
builder.Services.AddSingleton<IVersionProvider, VersionProvider>();
builder.Services.AddAntDesign();
builder.Services.AddHttpClient();
builder.Services.AddHttpContextAccessor();
return builder;
}
}