Intercept method calls

前端 未结 6 1289
故里飘歌
故里飘歌 2020-12-06 08:30

Is there a way of intercepting some method calls without making any code changes around the method itself?

I don\'t need to inject any custom behaviour at runtime,

6条回答
  •  死守一世寂寞
    2020-12-06 08:38

    I have successfully used Castle DynamicProxy for that. It's more lightweight than a full fledged AOP framework, and can be used without an IoC container.

提交回复
热议问题