How to inject factory-based dependencies from method aspect into type?
Let's use an example - in Microsoft.Extensions.Logging, I might register an ILoggerFactory so I can inject it into a type's constructor and then build a field from that. For example, typically this might look like this usually:
So I'd like to do something similar here. It's not quite what the dependency injection framework does because I'm injecting one thing into the constructor, but then making something else from it.
And ideally, it's something that I could do from a MethodAspect because I want to be able to apply the attribute to various methods.
Is this possible? As always, thank you!
So I'd like to do something similar here. It's not quite what the dependency injection framework does because I'm injecting one thing into the constructor, but then making something else from it.
And ideally, it's something that I could do from a MethodAspect because I want to be able to apply the attribute to various methods.
Is this possible? As always, thank you!