// Collection of code snippets by Arne Vajhøj // (likely posted to comp.os.vms/INFO-VAX, INFO-TPU, MACRO32, eksperten.dk, newz.dk, LinkedIn or other place sometime between 1990 and now) using System; using Vajhoej.StaticWeaver; using E; namespace EEE { [Aspect] public class SingletonLogAspect { [Pointcut(Signature="* EE.*::*(*)")] public static void LogPointcut() { } [BeforeCallAdvice(Pointcut="LogPointcut")] public static void Log(MethodJoinpoint mjp) { Console.WriteLine(ResponsibleHolder.Instance.Responsible.Name + " calling " + mjp.TypeName + "." + mjp.MethodName); } } }