10 container.AddFacility<TypedFactoryFacility>();
20
container.Register(Component.For<ITypedFactoryComponentSelector>().ImplementedBy<ComponentIdComponentSelector>());
30 container.Register(
Component.For<ILookupFormatterFactory>().LifeStyle.Transient
.AsFactory(c =>
c.SelectedWith<ComponentIdComponentSelector>()) //Note we must overide
default selector so we can select by component id
);
Line 30 ultimately results in a runtime error without line 20 ("The
referenced component Castle.Utils.Misc.Impl.ComponentIdComponentSelector
could not be resolved"). So I guess the question is can you have line 20
repeated for each unique ITypedFactoryComponentSelector implementation?
On Wednesday, January 23, 2013 4:11:55 PM UTC-6, Krzysztof Koźmic wrote:
>
> I'm not sure I understand what you're asking.
>
> Surely you know that you can add another Component.For …
> SelectedWith<AnotherSelector>()
>
> --
> Krzysztof Kozmic
>
> On Thursday, 24 January 2013 at 8:09 AM, Scott_M wrote:
>
> Is it possible to have multiple Typed factories in windsor but with
> different component selectors?
>
> This is how we register our single typed factory currently:
>
> container.AddFacility<TypedFactoryFacility>();
>
> container.Register(Component.For<ITypedFactoryComponentSelector>().ImplementedBy<ComponentIdComponentSelector>());
> container.Register(
>
> Component.For<ILookupFormatterFactory>().LifeStyle.Transient
> .AsFactory(c =>
> c.SelectedWith<ComponentIdComponentSelector>()) //Note we must overide
> default selector so we can select by component id
> );
>
> How would you register in the case that you had multiple typed factories
> but with different component selectors?
>
>
> --
> 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]<javascript:>
> .
> To unsubscribe from this group, send email to
> [email protected] <javascript:>.
> Visit this group at
> http://groups.google.com/group/castle-project-users?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>
>
>
--
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].
Visit this group at http://groups.google.com/group/castle-project-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.