public override void OnException(MethodArgs args) { Console.WriteLine("Exception occured in {0}", args.FullName); Console.WriteLine(args.Exception.ToString()); foreach (var p in args.Parameters) { Console.WriteLine("\t{0} ({1}): {2}", p.Name, p.Type, p.Value); } }
public override object Invoke(MethodArgs args) { Console.WriteLine("Enter a num: "); int num = int.Parse(Console.ReadLine()); if (num % 2 == 0) return args.Proceed(); else return new decimal(-1); }
public override void OnBefore(MethodArgs args) { Console.WriteLine(args.FullName); }
public virtual void OnAfter(MethodArgs args) { }
public virtual void OnSuccess(MethodArgs args) { }
public virtual void OnException(MethodArgs args) { }
public virtual void OnBefore(MethodArgs args) { }
public virtual object Invoke(MethodArgs args) { return null; }