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/TrashLib/Config/ConfigAutofacModule.cs

20 lines
508 B

using System.Reflection;
using Autofac;
using FluentValidation;
using Module = Autofac.Module;
namespace TrashLib.Config
{
public class ConfigAutofacModule : Module
{
protected override void Load(ContainerBuilder builder)
{
builder.RegisterType<ServerInfo>().As<IServerInfo>();
builder.RegisterAssemblyTypes(Assembly.GetExecutingAssembly())
.AsClosedTypesOf(typeof(IValidator<>))
.AsImplementedInterfaces();
}
}
}