public MethodInvocation (object target, MethodBase method, params object[] arguments) { Target = target; MethodBase = method; Arguments = new ParameterCollection (arguments, method.GetParameters ()); Context = new Dictionary<string, object> (); }
public MethodReturn (IMethodInvocation invocation, object returnValue, object[] allArguments) { Context = invocation.Context; ReturnValue = returnValue; var outputArgs = new List<object>(); var outputInfos = new List<ParameterInfo>(); var allInfos = invocation.MethodBase.GetParameters(); for (int i = 0; i < allInfos.Length; i++) { var info = allInfos[i]; if (info.ParameterType.IsByRef) { outputArgs.Add (allArguments[i]); outputInfos.Add (info); } } Outputs = new ParameterCollection (outputArgs, outputInfos); }
public MethodReturn (IMethodInvocation invocation, Exception exception) { Context = invocation.Context; Outputs = new ParameterCollection (new object[0], new ParameterInfo[0]); Exception = exception; }