0
假设我有这些结构获取方面相关的信息REG
class ss
{
public void createfile()
{
StreamWriter sw= new StreamWriter("d:/test.txt");
}
}
我需要做的方面在以往任何时候我使用的StreamWriter?
为作为代价我已经用下面的代码为
[assembly: MyAspect(AttributeTargetAssembly="mscorlib", AttributeTargetTypes="System.IO.File", AttributeTargetMembers="Create"]
for file.create method ..
它工作正常..
有什么办法来解决这个问题...
在等着你反应
检查此链接更新我的问题http://stackoverflow.com/questions/12798391/aspect-the-constructor-in-c-sharp-net-using-postsharp – GowthamanSS