コード例 #1
0
ファイル: SyntaxRewriterTests.cs プロジェクト: belav/roslyn
        public void ReturnNullFromStructuredTriviaRoot_Succeeds()
        {
            var text =
                @"#region
class C { }
#endregion";

            var expectedText =
                @"class C { }
#endregion";

            var root    = SyntaxFactory.ParseCompilationUnit(text);
            var newRoot = new RemoveRegionRewriter().Visit(root);

            Assert.Equal(expectedText, newRoot.ToFullString());
        }
コード例 #2
0
        public void ReturnNullFromStructuredTriviaRoot_Succeeds()
        {
            var text =
@"#region
class C { }
#endregion";

            var expectedText =
@"class C { }
#endregion";

            var root = SyntaxFactory.ParseCompilationUnit(text);
            var newRoot = new RemoveRegionRewriter().Visit(root);

            Assert.Equal(expectedText, newRoot.ToFullString());
        }