Intercepting child method calls using Unity

Using PIAB / Unity, is it possible to intercept calls to the "child" method?

eg. the class has three methods ...

DoSomething(), DoFirst(), DoSecond()

The DoSomething () method calls DoFirst (), which in turn calls DoSecond ()

I can get a DoSomething interception, but I can't get anything for DoFirst and DoSecond. I tried various rules for introducing policies ... Match type, tag attribute, method signature ... but nothing works. But I can intercept every method if I call them directly

So, the main question ... can you do this?

And if so, how!!

+3
source share
1 answer

, VirtualMethodInterceptor, TransparentProxy Interception

+1

Source: https://habr.com/ru/post/1760147/


All Articles