Closed jnm2 closed 2 years ago
That's a delegate return type, not a delegate parameter...
Ah, I got it now from chatting on Discord. I'm thinking of something like "When an injected delegate is invoked with arguments, the arguments to the delegate ("going in") are not decorated. The return value from the delegate ("coming out") is decorated." And maybe an example.
Maybe I'll review for other occurrences of 'delegate parameter' since it can be understood as "a delegate-typed parameter" as well as "a parameter of a delegate."
https://github.com/YairHalberstadt/stronginject#decorators:
If I understand what it's saying, I'm relieved that it's incorrect. It would be a very unpleasant pit of failure to switch from injecting
B
toFunc<B>
and start getting a different instance.Demonstrating (using 1.4.4) an instance provided by a delegate parameter being decorated: