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