Hi Mike

Could you please show your Component registration code?

I've never tried that pattern with Windsor, but maybe this post I
found with a quick google will help:
http://bjdavidson.wordpress.com/2010/02/25/castle-windsor-manual-registration-decorator-pattern/

Let me ask a (series of) question(s) though. Assuming, that you have
those two components implementing ISomeService registered. Which would
Windsor resolve for that service? Then, assuming it would resolve
AWrappingService, what happens? Resolving AWrappingService again would
mean an infinite loop or would it resolve DefaultService for the
"inner" parameter.

Going further, what happens if the decoration goes a few levels deep?
Especially, what would be the order of resolved components?

Regards
Tomasz

On 28 Lut, 18:54, Mike Nichols <[email protected]> wrote:
> I am trying to use TypedFactoryFacility to resolve a component which
> has decorated implementations, something like the model below. The
> parameter 'IRuntimeParameter' does not get forwarded to the
> 'inner' (decorated) component so it can't be resolved.
>
> Is there a way I can leverage some kind of
> ITypedFactoryComponentSelector to forward these parameters into the
> decorated component?
> Thanks for this awesome little tool. I use this extensively.
>
> :::SAMPLE MODEL::::
>
> public class AWrappingService : ISomeService{
>    public AWrappingService(ISomeService inner,IRuntimeParameter
> someParameter) { ... }
>
> }
>
> public class DefaultService : ISomeService {
>   public DefaultService(IRuntimeParameter someParameter) { ... }
>
> }
>
> public interface ISomeServiceFactory {
>    ISomeService Create(IRuntimeParameter someParameter);
>
>
>
>
>
>
>
> }

-- 
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