UnityConfiguration
UnityConfiguration copied to clipboard
Registrations overwrite existing registrations
I'm using a combination of registration via configuration and convention. I've added in the FirstInterfaceConvention but it is wiping out the registrations that already exist in the container.
I would prefer that it only add registrations where there isn't already an existing registration (matching on name or lack thereof).
I think the bug in RegistrationExpression.cs at line 55. The logic should be:
else if (container.IsRegistered(typeFrom, name) == false)
I ran into this issue as well, but encountered it when using the FactoryRegistrationExpression. The same logic to check if the type is already registered also applies there.