2025-12-03 02:22:37 -06:00
|
|
|
using LANCommander.Server.ImportExport.Services;
|
2025-04-10 19:45:41 -05:00
|
|
|
using Microsoft.Extensions.DependencyInjection;
|
|
|
|
|
|
2025-07-27 17:51:50 -05:00
|
|
|
namespace LANCommander.Server.ImportExport.Factories;
|
2025-04-10 19:45:41 -05:00
|
|
|
|
|
|
|
|
public class ImportContextFactory(IServiceProvider serviceProvider)
|
|
|
|
|
{
|
|
|
|
|
public ImportContext Create()
|
|
|
|
|
{
|
2025-12-03 02:22:37 -06:00
|
|
|
var importService = serviceProvider.GetRequiredService<ImportService>();
|
|
|
|
|
|
|
|
|
|
var context = new ImportContext(serviceProvider);
|
|
|
|
|
|
|
|
|
|
importService.AddContext(context);
|
2025-04-10 19:45:41 -05:00
|
|
|
|
2025-12-03 02:22:37 -06:00
|
|
|
return context;
|
2025-04-10 19:45:41 -05:00
|
|
|
}
|
|
|
|
|
}
|