using AdventOfCode.Solutions._2024; using Microsoft.Extensions.DependencyInjection; namespace AdventOfCode.Solutions { public static class ServiceConfiguration { public static IServiceCollection AddChallanges(this IServiceCollection services) { IEnumerable challanges = AppDomain.CurrentDomain.GetAssemblies().SelectMany(a => a.GetTypes()) .Where(t => t.GetInterfaces().Contains(typeof(IChallange))); services.AddScoped(); //foreach (Type challange in challanges) //{ // services.AddScoped(typeof(IChallange), challange); //} return services; } } }