// Collection of code snippets by Arne Vajhøj // (from articles on eksperten.dk / vajhoej.dk written sometime between 2004 and now) using System; using DotNetGuru.AspectDNG.Joinpoints; public class Trace { [AroundCall("* IntMath::*(*)")] [AroundCall("* DoubleMath::*(*)")] public static object MathTrace(MethodJoinPoint mjp) { Console.WriteLine("Before " + mjp); object result = mjp.Proceed(); Console.WriteLine("After " + mjp); return result; } }