I would like to write a text in a log file every time someone calls a function into my assembly. I know that I should use postsharp but it's too expensive for my purpose.
If there are any other possibilities, please inform me of those.
I would like to write a text in a log file every time someone calls a function into my assembly. I know that I should use postsharp but it's too expensive for my purpose.
If there are any other possibilities, please inform me of those.
前段时间我出于同样的目的使用了 Spring.Net。不知道该项目现在的状态如何,但当时它是免费的。您将使用面向方面的编程,它应该类似于 Postsharp 的工作方式......
本文向您展示了如何使用 Sprint.net 实现您所需要的:http: //www.codeproject.com/Articles/26726/AOP-Using-Spring-NET-Part-1