mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2025-09-17 17:14:18 +02:00
23 lines
583 B
C#
23 lines
583 B
C#
using System.Linq;
|
|
using System.Reflection;
|
|
using Autofac;
|
|
|
|
namespace NzbDrone.Api
|
|
{
|
|
public static class ContainerExtensions
|
|
{
|
|
public static void RegisterApiServices(this ContainerBuilder containerBuilder)
|
|
{
|
|
var apiAssembly = Assembly.Load("NzbDrone.Api");
|
|
|
|
|
|
containerBuilder.RegisterAssemblyTypes(apiAssembly)
|
|
.AsImplementedInterfaces()
|
|
.SingleInstance();
|
|
|
|
containerBuilder.RegisterAssemblyTypes(apiAssembly)
|
|
.AsSelf()
|
|
.SingleInstance();
|
|
}
|
|
}
|
|
} |