using System; using Microsoft.Extensions.DependencyInjection; using PhoenixLib.Extensions; namespace WingsEmu.Plugins.BasicImplementations; public static class ItemServiceCollectionExtensions { public static void AddHandlers(this IServiceCollection services) { Type[] types = typeof(TPlugin).Assembly.GetTypesImplementingInterface(); foreach (Type handlerType in types) { services.AddTransient(handlerType); } } }