Hi, am I missing something or Windsor's OnCreate registration is not working
for generic components?

class Program
{
 static void Main(string[] args)
{
var container = new WindsorContainer();

container.Register(Component.For(typeof (NonGenericComponent))
                   .OnCreate((k, r) => Console.WriteLine("this works")));
 container.Register(Component.For(typeof (GenericComponent<>))
                   .OnCreate((k, r) => Console.WriteLine("this doesn't
work")));

var x = container.Resolve<NonGenericComponent>();
var y = container.Resolve<GenericComponent<int>>();
 }
}

public class NonGenericComponent
 {
}

public class GenericComponent<T>
 {
}

-- 
You received this message because you are subscribed to the Google Groups 
"Castle Project Users" 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-users?hl=en.

Reply via email to