using Autofac; using Autofac.Extras.Ordering; using TrashLib.Sonarr.Api; using TrashLib.Sonarr.Config; using TrashLib.Sonarr.QualityDefinition; using TrashLib.Sonarr.ReleaseProfile; using TrashLib.Sonarr.ReleaseProfile.Filters; using TrashLib.Sonarr.ReleaseProfile.Guide; namespace TrashLib.Sonarr; public class SonarrAutofacModule : Module { protected override void Load(ContainerBuilder builder) { builder.RegisterType().As(); builder.RegisterType().As(); builder.RegisterType().As().SingleInstance(); builder.RegisterType().As(); // Release Profile Support builder.RegisterType().As(); builder.RegisterType().As(); builder.RegisterType() .As(); builder.RegisterType().As(); // Release Profile Filters (ORDER MATTERS!) builder.RegisterTypes( typeof(IncludeExcludeFilter), typeof(StrictNegativeScoresFilter)) .As() .OrderByRegistration(); // Quality Definition Support builder.RegisterType().As(); builder.RegisterType().As(); } }