If i use one-by-one component registration everything resolves ok.. my
problem is fluent registration, any thoughts?
Example
public class MyFilter:Filter {}
public class MyEntity:Entity {}
public class ReadCommandHandler<TEntity,TFilter> : ICommandHandler<
IReadCommand<TFilter>, IEnumerable<TEntity>> where TEntity : Entity where
TFilter : Filter
Installer
container.Register(Types.FromThisAssembly().BasedOn(typeof(
ICommandHandler<,>)).WithService.AllInterfaces());
this results in (debugger view)
ReadCommandHandler<·TEntity·, ·TFilter·> / ICommandHandler< IReadCommand
<·TFilter·>, IEnumerable<·TEntity·>>
so it seems is ok .. but then if i tried this
var biz = container.Resolve(typeof(ICommandHandler<IReadCommand<MyFilter
>,IEnumerable<MyEntity>>))
or this
var biz = container.Resolve(typeof(ICommandHandler<IReadCommand<Filter>,
IEnumerable<Entity>>))
the result is "No component for supporting the service"
whats the matter with this?
may be i have to use strategy GenericImplementationMatchingStrategy?
thanx
--
You received this message because you are subscribed to the Google Groups
"Castle Project Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/castle-project-users.
For more options, visit https://groups.google.com/d/optout.