IRegistrationSourceRegistrationsFor Method |
Retrieve registrations for an unregistered service, to be used
by the container.
Namespace:
Autofac.Core
Assembly:
Autofac (in Autofac.dll) Version: 6.0.0+39696a967e8826f7f1ebc8c1ff4523c9dd75abe0
Syntax IEnumerable<IComponentRegistration> RegistrationsFor(
Service service,
Func<Service, IEnumerable<ServiceRegistration>> registrationAccessor
)
Function RegistrationsFor (
service As Service,
registrationAccessor As Func(Of Service, IEnumerable(Of ServiceRegistration))
) As IEnumerable(Of IComponentRegistration)
Parameters
- service
- Type: Autofac.CoreService
The service that was requested. - registrationAccessor
- Type: SystemFuncService, IEnumerableServiceRegistration
A function that will return existing registrations for a service.
Return Value
Type:
IEnumerableIComponentRegistrationRegistrations providing the service.
Remarks
If the source is queried for service s, and it returns a component that implements both s and s', then it
will not be queried again for either s or s'. This means that if the source can return other implementations
of s', it should return these, plus the transitive closure of other components implementing their
additional services, along with the implementation of s. It is not an error to return components
that do not implement service.
See Also