You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
recyclarr/src/Recyclarr.Cli/Pipelines/CustomFormat/CustomFormatAutofacModule.cs

30 lines
1.0 KiB

using Autofac;
using Recyclarr.Cli.Pipelines.CustomFormat.Cache;
using Recyclarr.Cli.Pipelines.CustomFormat.Models;
using Recyclarr.Cli.Pipelines.CustomFormat.PipelinePhases;
namespace Recyclarr.Cli.Pipelines.CustomFormat;
public class CustomFormatAutofacModule : Module
{
protected override void Load(ContainerBuilder builder)
{
builder.RegisterType<ProcessedCustomFormatCache>()
.As<IPipelineCache>()
.AsSelf()
.InstancePerLifetimeScope();
builder.RegisterType<CustomFormatCachePersister>().As<ICustomFormatCachePersister>();
builder.RegisterType<CustomFormatDataLister>();
builder.RegisterTypes(
typeof(CustomFormatConfigPhase),
typeof(CustomFormatApiFetchPhase),
typeof(CustomFormatTransactionPhase),
typeof(CustomFormatPreviewPhase),
typeof(CustomFormatApiPersistencePhase),
typeof(CustomFormatLogPhase))
.AsImplementedInterfaces();
}
}