/// Action to be executed at completion of semantic analysis of an invocation expression in the target project.
        /// <param name="context">context for a symbol action.</param>
        private static void AnalyzeNode(SyntaxNodeAnalysisContext context)
        {
            // check for exclusion
            if (context.IsExcluded(DiagnosticIDs.DoNotUseCoroutines))
            {
                return;
            }

            // check dirty classes in the cache
            graph.CheckClassDirty(context);

            // check from each Update method in a MonoBehaviour script(if it is)
            context.ForEachMonoBehaviourUpdateMethod((method) =>
            {
                Stack <SyntaxNode> callStack = new Stack <SyntaxNode>();
                var ret = graph.SearchMethod(context, method, callStack);
                if (ret)
                {
                    // report a Diagnostic result
                    var diagnostic = Diagnostic.Create(DiagnosticDescriptors.DoNotUseCoroutines,
                                                       (callStack.FirstOrDefault() ?? method).GetLocation(), callStack.SyntaxStackToString());
                    context.ReportDiagnostic(diagnostic);
                }
            });
        }
        /// Action to be executed at completion of semantic analysis of a method in the target project.
        /// <param name="context">context for a symbol action.</param>
        static void AnalyzeNode(SyntaxNodeAnalysisContext context)
        {
            if (context.IsExcluded(DiagnosticIDs.MethodToDelegate))
            {
                return;
            }

            // check dirty classes in the cache
            graph.CheckClassDirty(context);

            // check from each Update method in a MonoBehaviour script(if it is)
            context.ForEachMonoBehaviourUpdateMethod((method) =>
            {
                Stack <SyntaxNode> callstack = new Stack <SyntaxNode>();
                if (graph.SearchMethod(context, method, callstack))
                {
                    // represents a diagnostic, such as a compiler error or a warning, along with the location where it occurred
                    var diagnostic = Diagnostic.Create(DiagnosticDescriptors.MethodToDelegate,
                                                       (callstack.FirstOrDefault() ?? method).GetLocation(), callstack.SyntaxStackToString());

                    // report a Diagnostic result
                    context.ReportDiagnostic(diagnostic);
                }
            });
        }