using System.Diagnostics; using LootDumpProcessor.Process; using LootDumpProcessor.Process.Processor.DumpProcessor; using LootDumpProcessor.Process.Processor.FileProcessor; using LootDumpProcessor.Process.Processor.v2.AmmoProcessor; using LootDumpProcessor.Process.Processor.v2.LooseLootProcessor; using LootDumpProcessor.Process.Processor.v2.StaticContainersProcessor; using LootDumpProcessor.Process.Processor.v2.StaticLootProcessor; using LootDumpProcessor.Process.Reader.Filters; using LootDumpProcessor.Process.Reader.Intake; using LootDumpProcessor.Process.Reader.PreProcess; using LootDumpProcessor.Storage; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Logging; namespace LootDumpProcessor; public static class Program { public static async Task Main() { var services = new ServiceCollection(); RegisterServices(services); await using var serviceProvider = services.BuildServiceProvider(); // Setup Data storage DataStorageFactory.GetInstance().Setup(); // startup the pipeline var pipeline = serviceProvider.GetRequiredService(); await pipeline.Execute(); } private static void RegisterServices(ServiceCollection services) { services.AddLogging(configure => configure.AddConsole()); services.AddTransient(); services.AddTransient(); services.AddTransient(); services.AddTransient(); services.AddSingleton(); services.AddSingleton(_ => DataStorageFactory.GetInstance()); services.AddTransient(); services.AddTransient(); services.AddTransient(); services.AddTransient(); services.AddTransient(); services.AddTransient(); services.AddTransient(); } }