Can I redirect .NET method calls to a new method at runtime?

后端 未结 5 928
我在风中等你
我在风中等你 2021-01-13 21:26

Suppose I have the following .NET classes:

public class C
{
    public void M()
    {
        ....
    }
}

and

public class         


        
5条回答
  •  悲&欢浪女
    2021-01-13 22:00

    I suspect you could do some IL weaving with PostSharp.

    I did find this nice article on using other tools too : http://blog.andreloker.de/post/2009/02/14/Simple-AOP-call-interception-with-DynamicProxy.aspx

提交回复
热议问题