Intercept method calls

前端 未结 6 1295
故里飘歌
故里飘歌 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条回答
  •  猫巷女王i
    2020-12-06 08:51

    You could take a look at Aspect Oriented Programming, and see if it's a solution for your situation.

    For instance: http://docs.castleproject.org/Default.aspx?Page=Introduction-to-AOP-With-Castle&NS=Windsor&AspxAutoDetectCookieSupport=1

    http://fgheysels.blogspot.be/2006/11/aspect-oriented-programming-in-net.html

提交回复
热议问题