Windsor Method interception (AOP)
- by Allan
Hi there guys,
I'm trying to create interceptors for specific methods but I'm having a hard time. I can't bind an aspect to a specific method. I create the faicilities most of examples show but it still doesn't work. Can anyone give me an example of how to do this? I prefer xml conifguration, if possible.
Another question, I have this code:
<component id="SampleAspect"
service="WindsorSample.Aspect.SampleAspect, WindsorSample"
type="WindsorSample.Aspect.SampleAspect, WindsorSample">
</component>
<component id="HtmlTitleRetriever"
type="WindsorSample.DummyObject, WindsorSample">
<parameters>
<interceptors>
<interceptor>${SampleAspect}</interceptor>
</interceptors>
</parameters>
</component>
Then...
IWindsorContainer container = new WindsorContainer(new XmlInterpreter());
IDummyObject retriever = container.Resolve<DummyObject>();
retriever.SomeMethod();
This aspect is not executed. Am I missing something? Am I using the wrong approach for aop?
Thanks