diff --git a/src/Prise.ReverseProxy/ReverseProxy.cs b/src/Prise.ReverseProxy/ReverseProxy.cs index ed1bc7d..286528a 100644 --- a/src/Prise.ReverseProxy/ReverseProxy.cs +++ b/src/Prise.ReverseProxy/ReverseProxy.cs @@ -42,6 +42,10 @@ protected T InvokeOnHostService(params object[] parameters) { var callingMethod = GetCallingMethod(); var methodInfo = PriseProxy.FindMethodOnObject(callingMethod as MethodInfo, this); + + if (methodInfo.IsGenericMethod) + methodInfo = methodInfo.MakeGenericMethod(); + if (methodInfo.GetParameters().Count() != parameters.Count()) throw new ReverseProxyException($"The number of parameters provided to this ReverseProxy {parameters?.Count()} do not match the actual parameter count of the hostService method ({methodInfo.GetParameters().Count()}). Did you forget to provide the correct number of parameters?");