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
If a type is registered in a Unity container where the interface and class follow the same pattern as used in 'registration by convention', when the RegisterTypes extension is used to register by convention, the original mapping is over-written despite the 'overwriteExistingMappings' flag of the extension method being set to 'false'.
`
var container = new UnityContainer();
container.RegisterType<IAppTester, AppTester>(new PerThreadLifetimeManager());
container.RegisterTypes(
AllClasses.FromLoadedAssemblies(),
WithMappings.FromMatchingInterface,
WithName.Default);
container.Registrations.First(r => r.RegisteredType.Equals(typeof(IAppTester))).LifetimeManager.GetType().Should().Be<PerThreadLifetimeManager>("specifically registered type should remain");
`
The text was updated successfully, but these errors were encountered:
If a type is registered in a Unity container where the interface and class follow the same pattern as used in 'registration by convention', when the RegisterTypes extension is used to register by convention, the original mapping is over-written despite the 'overwriteExistingMappings' flag of the extension method being set to 'false'.
`
`
The text was updated successfully, but these errors were encountered: