dadhi / DryIoc

DryIoc is fast, small, full-featured IoC Container for .NET
MIT License
1.03k stars 122 forks source link

Property injection is not working correctly when appending a new implementation for multiple registrations of the same interface and injecting an enumerable of the interface #534

Closed jbrookssmokeball closed 2 years ago

jbrookssmokeball commented 2 years ago

Property injection is not working correctly when appending a new implementation for multiple registrations of the same interface and injecting an enumerable of the interface.

It works fine if building the concrete type, but when injecting the enumerable of the interface it gives a null value on the second registered type.

It looks like it returns a different instance of the object too when it should be returning the singleton instance, which could be the root cause of the issue.

dadhi commented 2 years ago

@jbrookssmokeball Pleasant surprise to see not only the test in the issue but the actual PR with it .) So thanks.

Say if I can merge, or do you have other things to add?

jbrookssmokeball commented 2 years ago

@dadhi Just updated it with the issue number (sorry forgot to raise the actual issue 😅 - have raised it now at https://github.com/dadhi/DryIoc/issues/535) but otherwise I don't have anything else to add so feel free to merge, thanks!

dadhi commented 2 years ago

@jbrookssmokeball Great, merging then.