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.Platform/PlatformAutofacModule.cs

24 lines
706 B

using Autofac;
namespace Recyclarr.Platform;
public class PlatformAutofacModule : Module
{
protected override void Load(ContainerBuilder builder)
{
base.Load(builder);
RegisterAppPaths(builder);
}
private static void RegisterAppPaths(ContainerBuilder builder)
{
builder.RegisterType<DefaultAppDataSetup>().As<IAppDataSetup>().AsSelf().SingleInstance();
builder.RegisterType<DefaultEnvironment>().As<IEnvironment>();
builder.RegisterType<DefaultRuntimeInformation>().As<IRuntimeInformation>();
builder.Register(c => c.Resolve<DefaultAppDataSetup>().CreateAppPaths())
.As<IAppPaths>()
.SingleInstance();
}
}