public RpcMethodInfo FindGenericMethod(bool isStatic, List <RpcMethodInfo> methodsList, Type[] parameters)
        {
            foreach (var method in methodsList)
            {
                if (method.IsGeneric && isStatic == method.Method.IsStatic)
                {
                    var methodInfo = method.GenericMethod.GetRealMethod(parameters);

                    if (methodInfo != null)
                    {
                        var res = new RpcMethodInfo(methodInfo);
                        if (res.Compare(parameters))
                        {
                            return(res);
                        }
                    }
                }
            }

            return(null);
        }
        public RpcMethodInfo FindGenericMethod(bool isStatic, Type[] genericParameters, Type[] methodParameters)
        {
            if (_commonMethods.TryGetValue(methodParameters.Length, out var methodList))
            {
                foreach (var method in methodList)
                {
                    if (method.IsGeneric && isStatic == method.Method.IsStatic)
                    {
                        // var MethodInfo = метод.GenericMethod.GetRealMethod(genericParameters, methodParameters);
                        var methodInfo = method.GenericMethod.MethodInfo.MakeGenericMethod(genericParameters);
                        {
                            var res = new RpcMethodInfo(methodInfo);
                            if (res.Compare(methodParameters))
                            {
                                return(res);
                            }
                        }
                    }
                }
            }

            foreach (var method in _methodsParams)
            {
                if (method.IsGeneric && isStatic == method.Method.IsStatic)
                {
                    var methodInfo = method.GenericMethod.MethodInfo.MakeGenericMethod(genericParameters);// метод.GenericMethod.GetRealMethod(genericParameters, methodParameters);
                    {
                        var res = new RpcMethodInfo(methodInfo);
                        if (res.CompareParams(methodParameters))
                        {
                            return(res);
                        }
                    }
                }
            }

            return(null);
        }