Closed henriblMSFT closed 4 years ago
Branch feature-861 created.
This is not a bug, this is a feature 😇. Unfortunately, this feature is missing from v5.0 making it impossible to use the new DependencyMetadata<T>
feature in combination with flowing scopes. I added this to the v5.1 milestone.
That was fast! Thank you!
I'm no magician. I started working on this feature before responding to this issue. It was a few hours of work. Time well spent. Another nice improvement to the library. Thank you for reporting this (again).
This feature is now part of the just-released v5.1.
Side note: as I understood, this was not merged to main and only works in 5.1 version.
Whow shiii.... Thank's for reporting this @ScarletKuro. What this means is that this feature is part of v5.1, but is not part of v5.2 nor v5.3. This is a major error from my side.
DependencyMetadata.GetInstance() throws when attempting to resolve a Flowing scoped registration.
This happens because DependencyMetadata is always registered as a singleton and assume that scopes are always implicit. DependencyMetadata should be registered as Scoped if the InstanceProducer is a flowing scope.
Here's a test that exhibit this behavior: