public ComputeMethodInput(IFunction function, ComputeMethodDef method, AbstractInvocation invocation) : base(function) { Method = method; Invocation = invocation; NextInterceptorIndex = invocation.GetCurrentInterceptorIndex(); var arguments = invocation.Arguments; var argumentHandlers = method.ArgumentHandlers; var preprocessingArgumentHandlers = method.PreprocessingArgumentHandlers; if (preprocessingArgumentHandlers != null) { foreach (var(handler, index) in preprocessingArgumentHandlers) { handler.PreprocessFunc !.Invoke(method, invocation, index); } } var hashCode = System.HashCode.Combine( HashCode, method.InvocationTargetHandler.GetHashCodeFunc(invocation.InvocationTarget)); for (var i = 0; i < arguments.Length; i++) { hashCode ^= argumentHandlers[i].GetHashCodeFunc(arguments[i]); } HashCode = hashCode; }
public static void SetCurrentInterceptorIndex(this AbstractInvocation invocation, int value) => SetCurrentInterceptorIndexFunc.Invoke(invocation, value);
public static int GetCurrentInterceptorIndex(this AbstractInvocation invocation) => GetCurrentInterceptorIndexFunc.Invoke(invocation);