using Autofac; namespace Piwigo.Client.Autofac; public sealed class PiwigoModule : Module { private readonly IPiwigoConfiguration _configuration; public PiwigoModule(IPiwigoConfiguration configuration) { _configuration = configuration ?? throw new ArgumentNullException(nameof(configuration)); } protected override void Load(ContainerBuilder builder) { base.Load(builder); builder.RegisterInstance(() => _configuration).AsImplementedInterfaces(); builder.RegisterType().AsImplementedInterfaces().InstancePerLifetimeScope(); builder.RegisterType().AsImplementedInterfaces(); builder.RegisterType().AsImplementedInterfaces(); builder.RegisterType().AsImplementedInterfaces(); builder.RegisterType().AsImplementedInterfaces(); builder.RegisterType().AsImplementedInterfaces(); } }