mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-20 05:23:31 -07:00
Autofac registrations are not singleton anymore.
This commit is contained in:
parent
3cdff3bb71
commit
f2886d89de
5 changed files with 34 additions and 23 deletions
|
@ -37,15 +37,15 @@ namespace NzbDrone.Core
|
|||
|
||||
container.RegisterAssemblyTypes(assembly)
|
||||
.Where(t => t.IsSubclassOf(typeof(IndexerBase)))
|
||||
.As<IndexerBase>().SingleInstance();
|
||||
.As<IndexerBase>();
|
||||
|
||||
container.RegisterAssemblyTypes(assembly)
|
||||
.Where(t => t.IsSubclassOf(typeof(IndexerSearchBase)))
|
||||
.As<IndexerSearchBase>().SingleInstance();
|
||||
.As<IndexerSearchBase>();
|
||||
|
||||
container.RegisterAssemblyTypes(assembly)
|
||||
.Where(t => t.IsSubclassOf(typeof(ExternalNotificationBase)))
|
||||
.As<ExternalNotificationBase>().SingleInstance();
|
||||
.As<ExternalNotificationBase>();
|
||||
}
|
||||
|
||||
private static void InitDatabase(this ContainerBuilder container)
|
||||
|
@ -56,7 +56,7 @@ namespace NzbDrone.Core
|
|||
var appDataPath = environmentProvider.GetAppDataPath();
|
||||
if (!Directory.Exists(appDataPath)) Directory.CreateDirectory(appDataPath);
|
||||
|
||||
container.Register(c => c.Resolve<IDbFactory>().Create(environmentProvider.GetNzbDroneDatabase())).As<IDatabase>().SingleInstance();
|
||||
container.Register(c => c.Resolve<IDbFactory>().Create(environmentProvider.GetNzbDroneDatabase())).As<IDatabase>();
|
||||
|
||||
container.RegisterGeneric(typeof(BasicRepository<>)).As(typeof(IBasicRepository<>));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue