public object HandleFastCall(IAopProxy target, object executionTarget, int methodIndex, object[] rawParameters, Type returnType) { CallInfo info = MethodCache.GetCallInfo(methodIndex); MethodBase method = info.Method; IList interceptors = info.Interceptors; InterceptedParameter[] parameters = new InterceptedParameter[rawParameters.Length]; int index = 0; foreach (InvocationParameterInfo parameterInfo in info.InvocationParameterInfos) { InterceptedParameter parameter = new InterceptedParameter(parameterInfo, rawParameters, index); parameters[index] = parameter; index++; } #if NET2 MethodInvocation invocation = new MethodInvocation(target, executionTarget, method, method, parameters,rawParameters, returnType, interceptors); invocation.Handler = info.Handler; #else MethodInfo wrapperMethod = (MethodInfo) MethodCache.wrapperMethodLookup[info.MethodId]; MethodInvocation invocation = new MethodInvocation(target, executionTarget, method, wrapperMethod , parameters,rawParameters, returnType, interceptors); #endif return invocation.Proceed(); }
public object HandleFastCall(IAopProxy target, object executionTarget, int methodIndex, object[] rawParameters, Type returnType) { CallInfo info = MethodCache.GetCallInfo(methodIndex); MethodBase method = info.Method; IList interceptors = info.Interceptors; InterceptedParameter[] parameters = new InterceptedParameter[rawParameters.Length]; int index = 0; foreach (InvocationParameterInfo parameterInfo in info.InvocationParameterInfos) { InterceptedParameter parameter = new InterceptedParameter(parameterInfo, rawParameters, index); parameters[index] = parameter; index++; } #if NET2 MethodInvocation invocation = new MethodInvocation(target, executionTarget, method, method, parameters, rawParameters, returnType, interceptors); invocation.Handler = info.Handler; #else MethodInfo wrapperMethod = (MethodInfo)MethodCache.wrapperMethodLookup[info.MethodId]; MethodInvocation invocation = new MethodInvocation(target, executionTarget, method, wrapperMethod, parameters, rawParameters, returnType, interceptors); #endif return(invocation.Proceed()); }