You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It seems that Autofac's IRegistrationSource's RegistrationsFor method should really be called AdditionalRegistrationsFor, because the intention is to have the source return an empty set where registrations should be left as-is, and only return additional registrations where appropriate. This was a bit misleading at first glance, and MoqRegistrationSource consequently doubles the registrations for all components resolved via the container. The lines that currently read:
* extracted ILoggingConfig from LoggingConfig
* switched to interface usage everywhere
* modified LoggingModule logic to allow config source to be unregistered /
config section to be missing; either case results in a default instance
of LoggingConfig to be registered
* changed MoqRegistrationSource to only return registrations when creating
new Mock-based ones; now returns an empty set in al other cases
* added new test assertions to verify the number of registrations before
and after MoqRegistrationSource is used with a container instance
It seems that Autofac's
IRegistrationSource
'sRegistrationsFor
method should really be calledAdditionalRegistrationsFor
, because the intention is to have the source return an empty set where registrations should be left as-is, and only return additional registrations where appropriate. This was a bit misleading at first glance, andMoqRegistrationSource
consequently doubles the registrations for all components resolved via the container. The lines that currently read:should be changed to read:
The text was updated successfully, but these errors were encountered: