且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

我怎样才能跟踪()添加到在C#中的每一个方法调用?

更新时间:2023-12-01 23:46:10

可能是你***的选择将是使用AOP(面向方面​​编程)框架自动调用前一个方法执行后的跟踪code。为AOP和.NET一个流行的选择是 PostSharp

Probably your best bet would be to use an AOP (aspect oriented programming) framework to automatically call tracing code before and after a method execution. A popular choice for AOP and .NET is PostSharp.