private static void VisitMethods(SyntaxNodeAnalysisContext ctx)
        {
            var node = ctx.Node as MethodDeclarationSyntax;

            if (node != null)
            {
                //This analyzer will trace the node only if it is in debug mode.
                if (SGLogging.IsConfigured())
                {
                    SGLogging.Log("== Method : " + node.Identifier.Text + " (BEGIN) ==", false);
                    visitNodeRecursively(node, 0, ctx);
                    SGLogging.Log("== Method : " + node.Identifier.Text + " (END) ==", false);
                }
            }
        }
示例#2
0
        private static void VisitMethodsEx(SyntaxNodeAnalysisContext ctx)
        {
            var node = ctx.Node as Microsoft.CodeAnalysis.VisualBasic.Syntax.MethodBlockSyntax;

            if (node != null)
            {
                //This analyzer will trace the node only if it is in debug mode.
                if (SGLogging.IsConfigured())
                {
                    SGLogging.Log("== Method : " + node.BlockStatement.GetText() + " (BEGIN) ==", false);
                    visitNodeRecursivelyEx(node, 0, ctx);
                    SGLogging.Log("== Method : " + node.BlockStatement.GetText() + " (END) ==", false);
                }
            }
        }