It would be easier if ResolveComponent was part of IKernel, since we already know the handler and doing Resolve for handler's service is just double work.
On Apr 11, 2:01 am, Krzysztof Koźmic <[email protected]> wrote: > It can do kernel.GetAssignableHandlers() and inspect them and then > resolve the one it wants. > > On 2010-04-10 19:45, Felix Gartsman wrote: > > > But ISubDependencyResolver doesn't get access to a list of matching > > handlers (IPageTypeRenderer). > > > On Apr 10, 7:30 pm, Krzysztof Ko mic<[email protected]> > > wrote: > > >> Yeap, my bad. > > >> Try ISubDependencyResolver then > > >> On 2010-04-10 18:05, Felix Gartsman wrote: > > >>> Hi, > >>> I''m writing a CMS (yes I know about Joomla, Drupal, etc...:). The CMS > >>> has multiple page types - article, event, product, etc... I've > >>> components that render those pages. Each page type has multiple > >>> templates (not only theming, but things like 'show related products', > >>> which require extra logic). In comment to > >>>http://support.castleproject.org/projects/IOC/issues/view/IOC-ISSUE-199, > >>> Krzysztof Ko mic suggested that I 'put that metadata in > >>> ExtendedProperties and use IHandlerSelector to choose appropriate > >>> component based on that metadata and configuration.' > >>> I don't see how the IHandlerSelector can know what the current > >>> template is. The template name is read from a database, and short of > >>> using Local Storage (i.e. HttpContext.Current.Items) there is no way > >>> to transfer local parameters to IHandlerSelector. Resolve arguments > >>> aren't available there. > >>> Felix. -- 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.
