Actually looking at this more closely and the way I've normally used
interceptors the issue here is the interceptor has no way of knowing how to
intercept our concrete implementations with that setup.

it only intercepts the methods that are available in what its intercepting
against. Example

<code>
public interface IFoo
{

   void DoFoo();

}

public class FooImp : IFoo
{
   public void DoFoo()
{

}

 public virtual void NotInFoo()
{
}

}
</code>

If you apply the interceptor to IFoo, when you run FooImp you'd only get
DoFoo() applying.  If you apply the interceptor to FooImp, you'd only get
NotInFoo applying.


For this to work you'd have to do what was suggested Alexander, which is
what i've done when I wanted to provide aop logging in a non web app, I
assume it'd work identical in a web one.



On Sun, Apr 12, 2009 at 12:01 AM, Ryan Svihla <[email protected]> wrote:

> What happens when you register on IController?
>
> On Thu, Apr 2, 2009 at 8:57 AM, Wayne Douglas <[email protected]>wrote:
>
>>
>> Hi
>>
>> Can anyone spot anything wrong with this:
>>
>> <code>
>>            IWindsorContainer container = new WindsorContainer();
>>            container.Register(
>>                    Component.For<LoggingInterceptor>(),
>>                    AllTypes.Of<Controller>()
>>                        .FromAssembly(Assembly.GetExecutingAssembly())
>>                            .Configure(c => c.Interceptors(new
>> InterceptorReference(typeof(LoggingInterceptor)))),
>>                    AllTypes.Of<SmartDispatcherController>()
>>                        .FromAssembly(Assembly.GetExecutingAssembly())
>>                            .Configure(c => c.Interceptors(new
>> InterceptorReference(typeof(LoggingInterceptor))))
>>                    );
>> </code>
>>
>> All the controllers are loaded ok - but the interceptors never happen...
>>
>> w://
>>
>> --
>> Cheers,
>>
>> w://
>>
>> >>
>>
>
>
> --
> Ryan Svihla
> Systems Developer
> Farm Bureau Bank
>
>


-- 
Ryan Svihla
Systems Developer
Farm Bureau Bank

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