using Autofac; using Autofac.Extras.AggregateService; using TrashLib.Config.Services; using TrashLib.Services.Radarr.Config; using TrashLib.Services.Radarr.CustomFormat; using TrashLib.Services.Radarr.CustomFormat.Api; using TrashLib.Services.Radarr.CustomFormat.Guide; using TrashLib.Services.Radarr.CustomFormat.Processors; using TrashLib.Services.Radarr.CustomFormat.Processors.GuideSteps; using TrashLib.Services.Radarr.CustomFormat.Processors.PersistenceSteps; using TrashLib.Services.Radarr.QualityDefinition; using TrashLib.Services.Radarr.QualityDefinition.Api; namespace TrashLib.Services.Radarr; public class RadarrAutofacModule : Module { protected override void Load(ContainerBuilder builder) { // Services builder.RegisterType().As(); builder.RegisterType().As(); builder.RegisterType().As(); // Configuration builder.RegisterType().As(); builder.RegisterType().As(); // Quality Definition Support builder.RegisterType().As(); // Custom Format Support builder.RegisterType().As(); builder.RegisterType().As(); builder.RegisterType().As(); builder.RegisterType().As(); // Guide Processor // todo: register as singleton to avoid parsing guide multiple times when using 2 or more instances in config builder.RegisterType().As(); builder.RegisterAggregateService(); builder.RegisterType().As(); builder.RegisterType().As(); builder.RegisterType().As(); // Persistence Processor builder.RegisterType().As(); builder.RegisterAggregateService(); builder.RegisterType().As(); builder.RegisterType().As(); builder.RegisterType().As(); } }