1

I'm trying to call a function after/before every function call to BCL in an ASP.NET application.

For example when Server.MapPath is called I want to call my own function right after and before that particular call.

Is there an AOP library that supports this? Can PostSharp or Afterthought do this?

dr. evil
  • 26,944
  • 33
  • 131
  • 201

1 Answers1

0

Have you tried weaving the original assembly from the GAC and storing the result an local copy in your binary directory? that should work. however: You may need to define your own method on how to define a pointcut definition. i think both, postsharp and afterthought support assembly wide pointcut definitions, but doing that would mean that you define it within the assembly. I have seen someone managing to do this with postsharp, but could not find it anymore :/ I hope i can give you a better answer when i dived more into Afterthought. I am currently porting a project from Postsharp to Afterthought - what makes me quite unhappy...

Thomas Haller
  • 199
  • 1
  • 11