Hi,

 

We are using some interceptors to get some AOP concerns implemented. We are
also using the IContributeComponentModelConstruction interface to customize
the component construction. However, I've just realized that the
ComponentModel being passed to the ProcessModel method in this interface
does not have any Interceptors enlisted.

 

If I use the ICommissionConcern though, the Apply() method gets called with
a ComponentModel where these are set.

 

Is this by design, or is it a mistake? :-)

 

The components in question are are being registered like this, where the
OptionallyConfigureProxying method is a helper that optionally (based on
attributes) adds interceptors and mixins:

 

            windsorContainer.Register(AllTypes

                                        .FromAssembly(assembly)

                                        .IncludeNonPublicTypes()

                                        .Where(t =>
t.HasCustomAttribute<InjectableAttribute>(inherit: true))

                                        .Configure(c =>
c.ConfigureService())

                                        .Configure(c =>
c.ConfigurePropertyInjection())

                                        .Configure(c =>
c.OptionallyConfigureProxying(interceptorTypes, mixins))

 
.WithService.Select(InjectableTypeServiceSelector));

 

OptionallyConfigureProxying looks somewhat like this (simplified example):

 

            ComponentRegistration<object> configuration =
componentRegistration.Configuration();

            configuration = configuration

 
.Interceptors(interceptorTypes)

                                                .Proxy.MixIns(mixins);

            return configuration;

 

Best regards,

Per

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