Hi there, 
        
The issue IOC-ISSUE-141 was just created by Germ?n Schuager (german).
        
        Key: IOC-ISSUE-141
        Summary: Cannot resolve component with open generic parameter that has 
dependency on a closed generic service.
        Type: Bug
        Importance: High
        
        Description:
        Given the following interfaces/classes:
public interface IService { }
public interface IProcessor<T> { }
public interface IAssembler<T> { }
public class Service1 : IService
{
        public Service1(IProcessor<object> processor)
        {
        }
}
public class DefaultProcessor<T> : IProcessor<T>
{
        public DefaultProcessor(IAssembler<T> assembler)
        {
        }
}
public class ObjectAssembler : IAssembler<object> { }
And this setup code:
var kernel = new DefaultKernel();
kernel.AddComponent("service1", typeof(IService), typeof(Service1));
kernel.AddComponent("processor", typeof(IProcessor<>), 
typeof(DefaultProcessor<>));
kernel.AddComponent("assembler", typeof(IAssembler<object>), 
typeof(ObjectAssembler));
Then, this work:
kernel.Resolve<IProcessor<object>>()
but this does not (and it fails telling you why)
kernel.Resolve<IService>()
        
For more, see 
http://support.castleproject.org/projects/IOC/issues/view/IOC-ISSUE-141
 
        
--
donjon
by Castle Stronghold
http://www.castle-donjon.com



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Castle Project Development List" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/castle-project-devel?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to