Thanks
I have already seen IHandlersSelector. After I have chosen a handler
how can I inject the dependencies extracted from the requested
component name? I tried to return a fresh instance of IHandler but I
had problems with initializing it properly. First I needed
IKernelInternal. Having supplied it then it seems that ComponentModel
is incomplete and has no constructors. This one I'm not sure how to
populate.
I did however managed to implement a IHandlersSelector in a hackish
way. When a recognized component key is requested I parse it to
extract the dependency values and register a new component with
IKernel. The gotcha is that a check must be made to ensure that
registration hasn't been made already. Otherwise
StackOverflowException is thrown.
Is this a terrible usage or is that the only way to dynamically
register components at resolve-time?
Regards,
Tom
> Patrick Steelehttp://
weblogs.asp.net/psteele
> >>> To post to this group, send email to castle-pro...@**
googlegroups.com.
>
> >>> To unsubscribe from this group, send email to castle-project-users+**
> >>>
unsub...@googlegroups.com.
> >>> For more options, visit this group athttp://
groups.google.com/**
> >>> group/castle-project-users?hl=**en<
http://groups.google.com/group/castle-project-users?hl=en>
> >>> .