private static void AddMethodSignatureInspections(IHighlightingConsumer consumer, IMethod method,
                                                          UnityEventFunction function, EventFunctionMatch match)
        {
            if (match == EventFunctionMatch.NoMatch || match == EventFunctionMatch.ExactMatch)
            {
                return;
            }

            var methodSignature = function.AsMethodSignature(method.Module);

            foreach (var declaration in method.GetDeclarations())
            {
                if (declaration is IMethodDeclaration methodDeclaration)
                {
                    if ((match & EventFunctionMatch.MatchingStaticModifier) != EventFunctionMatch.MatchingStaticModifier)
                    {
                        consumer.AddHighlighting(new InvalidStaticModifierWarning(methodDeclaration, methodSignature));
                    }
                    if ((match & EventFunctionMatch.MatchingReturnType) != EventFunctionMatch.MatchingReturnType)
                    {
                        consumer.AddHighlighting(new InvalidReturnTypeWarning(methodDeclaration, methodSignature));
                    }
                    if ((match & EventFunctionMatch.MatchingSignature) != EventFunctionMatch.MatchingSignature)
                    {
                        consumer.AddHighlighting(new InvalidSignatureWarning(methodDeclaration, methodSignature));
                    }
                    if ((match & EventFunctionMatch.MatchingTypeParameters) != EventFunctionMatch.MatchingTypeParameters)
                    {
                        consumer.AddHighlighting(new InvalidTypeParametersWarning(methodDeclaration, methodSignature));
                    }
                }
            }
        }
        private void AddMethodSignatureInspections(IHighlightingConsumer consumer, IMethod method,
                                                   UnityEventFunction function, MethodSignatureMatch match)
        {
            if (match == MethodSignatureMatch.NoMatch || match == MethodSignatureMatch.ExactMatch)
            {
                return;
            }

            var methodSignature = function.AsMethodSignature(method.Module);

            foreach (var declaration in method.GetDeclarations())
            {
                if (declaration is IMethodDeclaration methodDeclaration)
                {
                    AddMethodSignatureInspections(consumer, methodDeclaration, methodSignature, match);
                }
            }
        }