Castle Windsor Interceptor selectors and hooks -


i'm doing project in castle windsor , have problems interceptor hook in config file created class impements iproxygenerationhook:

public class loggingproxygenerationhook : iproxygenerationhook {      #region iproxygenerationhook members      public void methodsinspected()     {         //throw new exception("the method or operation not implemented.");     }      public void nonvirtualmembernotification(type type, system.reflection.memberinfo memberinfo)     {         //throw new exception("the method or operation not implemented.");     }      public bool shouldinterceptmethod(type type, system.reflection.methodinfo methodinfo)     {         return methodinfo.name.startswith("save", stringcomparison.ordinal);     }      #endregion } 

all want intercept methods name start "save" , hook them dynamically in config file. also, in config file have following:

<component id="loggingaspect" type="dynamicinterceptor.loggingaspect, dynamicinterceptor"></component> <component id="loggingproxygenerationhook" type="dynamicinterceptor.loggingproxygenerationhook, dynamicinterceptor"></component> <component id="testclass1" type="testclasses.testclass1, testclasses"> <interceptors hook ="${loggingproxygenerationhook}"> <interceptor>${loggingaspect}</interceptor> </interceptors> </component> 

i suppose i'm doing wrong in config file. ideas?

works me. (windsor/core 2.5.2)


Comments

Popular posts from this blog

asp.net - repeatedly call AddImageUrl(url) to assemble pdf document -

java - Android recognize cell phone with keyboard or not? -

iphone - How would you achieve a LED Scrolling effect? -