I need to intercept method invocations… please suggest a ready-made solution.
It’s necessary to block access to some methods (so calling them will generate an exception)
I need to intercept method invocations… please suggest a ready-made solution. It’s necessary to
Share
AOP offers the functionality you a looking for. For a full AOP solution you can use PostSharp.
Since you are just searching for a way to intercept method calls, you just need a subset of AOP. So any IoC container which offers interface interception is also suitable. To my knowledge Spring.NET, Unity and Castle Windsor offers interface interception.
Edit: If you need interception really fast and have an existing code base, I suggest to use PostSharp. In order to use some IoC container you maybe need to modify a lot of code. If you have a new project consider IoC. Designing an application using IoC has a lot of positive effects.