Closed afmuller closed 1 year ago
Got it. Quickie workaround is to make the handler methods static.
Hi Jeremy Confirmed, it works perfectly with static methods, thanks.
So Wolverine happily disambiguates the handlers names already if it's building everything up itself, but that wasn't covering the case of needing to use a nested container to build things. I'm working on that use case too. Somewhere in the dependency tree you've got a service registration by lambda builder that's either Scoped or Transient? That's why Wolverine is having to use the nested container
In my project I have two handlers (in two different namespaces) for the same 'CompanyCreated' event.
However, the code generated by Wolverine declares/uses the 'companyCreatedHandler' variable name twice - and the code therefore does not compile.
WolverineFx version 0.9.16.
First handler:
Second handler:
Generated code - 'companyCreatedHandler' variable name used twice: