public ILifetime ImplementedBy <TImplementation>() where TImplementation : TService { var implementedByRegistration = new ComponentImplementedByRegistration <TService, TImplementation>(_serviceTypes); _register = implementedByRegistration; return(implementedByRegistration); }
public void Register(IServiceCollection services) { var filteredTypes = FilteredTypes; foreach (var type in filteredTypes) { var serviceTypes = _serviceTypeSelector.GetServicesFor(type); var serviceLifetimeSelector = _serviceTypeSelector.GetLifetimeSelector(); var componentRegistration = new ComponentImplementedByRegistration <object, object>(serviceTypes, type, serviceLifetimeSelector); componentRegistration.Register(services); } }