Closed worldspawn closed 10 months ago
I'm gonna happily take a PR for that one. Can't say that I knew that was possible. Also, MT does some wacky stuff in its internals.
I'd do a PR, but I don't know enough about the why of whats in the if... what's around the if :D etc etc.
I PR'd specifying a name into MT so I'm unblocked.
Sorry, back to Lamar issues today. What are you even doing that hits this btw?
Nevermind, I saw the "MassTransit" remark. Pfft.
This bit of code: https://github.com/JasperFx/lamar/blob/88286f99231b7bc3de041688382257a815e66c3a/src/Lamar/IoC/Instances/CtorArg.cs#L38
Doesn't check if Parameter.Name is null. If the type is a generated type the parameter names can be null.
A real world example of this is using MassTransit's multi-bus feature. It generates a type with a constructor + parameter but doesn't give it a name. That type is then registered with the container and resolving it fails.