Inheritance: Microsoft.CodeAnalysis.CSharp.CSharpSyntaxWalker
コード例 #1
0
        public string CreateFromFile(string fileContent)
        {
            var tree = CSharpSyntaxTree.ParseText(fileContent);

            var comments = new CommentWalker();
            comments.Visit(tree.GetRoot());

            var nodes = tree.GetRoot().DescendantNodes(descendIntoTrivia: true);

            foreach (var syntaxNode in nodes)
            {

            }
            return "";
            //var res = new ExampleCode(null, )
        }
コード例 #2
0
        public string CreateFromFile(string fileContent)
        {
            var tree = CSharpSyntaxTree.ParseText(fileContent);

            var comments = new CommentWalker();

            comments.Visit(tree.GetRoot());

            var nodes = tree.GetRoot().DescendantNodes(descendIntoTrivia: true);

            foreach (var syntaxNode in nodes)
            {
            }
            return("");
            //var res = new ExampleCode(null, )
        }