public int Code2(ref int i, int j, ref int k) { var types = new Type[] { typeof(int).MakeByRefType() }; var codeMethod = developer.GetType().GetMethod("Code", types); var aspectArgs = new FunctionExecutionArgsImpl <CSharpDeveloperMixin, int, int, int, int>(developer, codeMethod, i, j, k); Aspects.traceAspect3.OnEntry(aspectArgs); try { i = aspectArgs.Arg1; k = aspectArgs.Arg3; aspectArgs.ReturnValue = developer.Code(ref i, aspectArgs.Arg2, ref k); aspectArgs.Arg1 = i; aspectArgs.Arg3 = j; Aspects.traceAspect3.OnSuccess(aspectArgs); } //catch (Exception ex) { // aspectArgs.Exception = ex; // Aspects.traceAspect3.OnException(aspectArgs); // if (aspectArgs.FlowBehavior == FlowBehavior.RethrowException) { // throw; // } //} finally { Aspects.traceAspect3.OnExit(aspectArgs); } return(aspectArgs.ReturnValue); }
public int Invoke(ref CSharpDeveloperMixin instance, IFunctionArgs <int, int, int, int> args) { var i = args.Arg1; var k = args.Arg3; args.ReturnValue = instance.Code(ref i, args.Arg2, ref k); args.Arg1 = i; args.Arg3 = k; return(args.ReturnValue); }