Vote count:
0
I can override some method like GetHashCode or my own abstract class but aspect not firing on SqlConnection.Open and Close
SqlConnection a = new SqlConnection("Password=qwsa;Persist Security Info=True;User ID=sa2;Initial Catalog=mydb;Data Source=.");
a.Open(); // not firing
var zzzz = a.GetHashCode(); //firing
a.Close(); //not firing
Class1 class1 = new Class1(); //firing
var zzzzzzz=class1.testttt(); //not firing
Here is my code
[Serializable]
public class TestOverrideAspect : OnMethodBoundaryAspect
{
public override void OnExit(MethodExecutionArgs args)
{
//DoWORK
}
}
#if DEBUG
[assembly: PostsharpAspects.TestOverrideAspect (
AttributeTargetAssemblies = "*",
AttributeTargetTypes = "*",
AttributeInheritance=MulticastInheritance.Multicast
)
]
asked 1 min ago
PostSharp OnMethodBoundaryAspect not firing on some asbtract method
Aucun commentaire:
Enregistrer un commentaire