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

32 lines
1.4 KiB

using Autofac;
using Autofac.Extras.AggregateService;
using Recyclarr.Cli.Cache;
using Recyclarr.Cli.Pipelines.CustomFormat.Api;
using Recyclarr.Cli.Pipelines.CustomFormat.Guide;
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<CustomFormatGuideService>().As<ICustomFormatGuideService>().SingleInstance();
builder.RegisterType<ProcessedCustomFormatCache>().As<IPipelineCache>().AsSelf().InstancePerLifetimeScope();
builder.RegisterType<CustomFormatService>().As<ICustomFormatService>();
builder.RegisterType<CachePersister>().As<ICachePersister>();
builder.RegisterType<CustomFormatLoader>().As<ICustomFormatLoader>();
builder.RegisterType<CustomFormatCategoryParser>().As<ICustomFormatCategoryParser>();
builder.RegisterType<CustomFormatDataLister>();
builder.RegisterAggregateService<ICustomFormatPipelinePhases>();
builder.RegisterType<CustomFormatConfigPhase>();
builder.RegisterType<CustomFormatApiFetchPhase>();
builder.RegisterType<CustomFormatTransactionPhase>();
builder.RegisterType<CustomFormatPreviewPhase>();
builder.RegisterType<CustomFormatApiPersistencePhase>();
}
}