public void RegisterServicesByConvention(IClassLocator classLocator, IContainerBuilder builder) { foreach (var type in classLocator.FindTypesImplementing <IService>()) { builder.RegisterAsImplementedInterfaces(type); } foreach (var type in classLocator.FindTypesImplementing <IStatefulService>()) { builder.RegisterSingletonAsImplementedInterfaces(type); } }
public void RegisterCommandHandlersByConvention(IClassLocator classLocator, IContainerBuilder builder) { foreach (var type in classLocator.FindTypesImplementing <ICommandHandler>()) { builder.RegisterAsImplementedInterfaces(type); } }