-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bulk registration of open generics (part 2) #153
Comments
@davidkeaveny that's a very interesting problem I would have assumed they all work but generics can be tricky. I'm heading out on vacation tomorrow so I don't think I'll have time to look at this till next week. Would it be possible to put together a simple solution showing this and send it along? |
Repro attached: Cqrs.zip I tried replacing Grace with StructureMap and got something similar, although SM gave me a compile-time error when I tried to explicitly register the type. |
@davidkeaveny I took a look at the example and I can see why you can't do what you want to do. Ultimately it boils down to Or put it another way in the implementation example |
Looks like you're right; in the end, I took the approach used by Mediator, which has a wrapper which is able to make the necessary conversion from |
Continuing from #148, I've got a slightly different issue; previously, I was registering all implementations of the following:
using the following code in a configuration module:
then I would resolve them thusly:
and there was much rejoicing.
Now however, I want to change my resolution of the type to be like this:
but I am getting a
LocateException
. I tried explicitly registering a query handler like this:but that results in a
RecursiveLocateException
instead.So I don't know if the problem is how I am registering my types, or how I am resolving them! Any ideas?
The text was updated successfully, but these errors were encountered: