Closed RyanMarcotte closed 3 years ago
Thank you for this detailed report. Unfortunately, injecting DependencyMetadata<T>
is not supported in decorators. For this another mechanism currently exists, which is DecoratorContext
as explained here.
For consistency, however, it might be good to add DependencyMetadata<T>
support for decorators as well.
Moved to new feature request #879.
I somehow missed that section of the documentation. Thank you for pointing me in the right direction!
To Reproduce
The above code is the minimum needed to reproduce the problem. In my own code, I have two decorators applied instead of just one. That is why I would like to use
DependencyMetadata<T>
: to retrieve information about the decorated implementation type (eitherThing1
orThing2
in the example above) for logging purposes.Expected behavior
Per my understanding of the documentation here and here...
T
is registeredT
DependencyMetadata<T>
Actual behavior