That is the expected behavior.
The deciding factor is whatever or no you specified HasInterceptors or not.

On Sat, Feb 7, 2009 at 1:37 PM, Andre Loker <[email protected]> wrote:

>  Hi,
>
> If I register a IModelInterceptorsSelector at the Kernel that returns true
> from HasInterceptors but then for some contextual reason returns null from
> SelectInterceptors  (see example below), the kernel will still proxy the
> target, although nothing will be intercepted. Is this behavior intentional?
> What's the use of a proxy without interceptors?
>
> Regards,
> Andre
>
>
> Example:
>
> class StupidInterceptorsSelector : IModelInterceptorsSelector {
>
>   public InterceptorReference[] SelectInterceptors(ComponentModel model) {
>     if(someCondition){
>        return null;
>     } else{
>        return someInterceptors;
>     }
>   }
>
>   public bool HasInterceptors(ComponentModel model) {
>     return true;
>   }
> }
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Castle Project Development List" 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-devel?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to