4 using PostSharp.Aspects;
18 Arguments arguments = args.Arguments;
20 StackTrace st =
new StackTrace(args.Exception,
true);
21 StackFrame frame = st.GetFrame(0);
24 foreach (
object argument
in arguments)
28 Singleton<Logger>.
Instance.LogException(args.Exception, args.Method.Name, frame.GetFileName(), frame.GetFileLineNumber());
29 args.FlowBehavior = FlowBehavior.Continue;
30 base.OnException(args);
Class for creating a singleton for a generic class
override void OnException(MethodExecutionArgs args)
Method executed after the body of methods to which this aspect is applied, in case that the method re...
static T Instance
Gets the instance.