Open
Description
We have a scenario in our project where we Register an interface type with different instances with different name. We also have a register for same interface type without any name.
We need to find out what is the expected behavior When Resolve fails to find any registered instance with given name. Especially in below case where we have another named instanced registered for same interface type IEventPublisher
Documentation for named registrations does not explicitly mention what is the default behavior in such cases.
Example:
container.Register<IEventPublisher>( "ChangeFeed", LifetimeType.Singleton, changeFeedObject);
container.Register<IEventPublisher>( null, LifetimeType.Singleton, changeFeedObject);
// later
var notExistingPublisher = container.Resolve<IEventPublisher>( "nonExistingName" );
Metadata
Metadata
Assignees
Labels
No labels