I want to register an implementation for my service
IQueryService<TEntity, TPrimaryKey>
.
So I have code that looks like this:
IocManager.IocContainer.Register(Component.For(typeof(IQueryService<,>))
.ImplementedBy(typeof(QueryService<,,,>);
And I want to create a similar implementation for entities with string
as primary key, let's call it QueryServiceString
. Is there a way to write it down so that Castle Windsor will automatically pick up which class it should inject?
IocManager.IocContainer.Register(Component.For(typeof(IQueryService<,STRING?>))
.ImplementedBy(typeof(QueryServiceString<,,>)