Пример #1
0
        private static void SyntaxReplacer()
        {
            SyntaxTree          tree     = CSharpSyntaxTree.ParseText(codeTryCatch);
            CatchSyntaxRewriter rewriter = new CatchSyntaxRewriter();
            var newRoot = rewriter.Visit(tree.GetRoot());

            Console.WriteLine(newRoot.ToFullString());
        }
Пример #2
0
 private static void SyntaxReplacer()
 {
     SyntaxTree tree = CSharpSyntaxTree.ParseText(codeTryCatch);
     CatchSyntaxRewriter rewriter = new CatchSyntaxRewriter();
     var newRoot=rewriter.Visit(tree.GetRoot());
     Console.WriteLine(newRoot.ToFullString());
 }