Created
January 21, 2015 22:44
-
-
Save JoshVarty/73df272ec798b2627a28 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var tree = CSharpSyntaxTree.ParseText(@" | |
| public class MyClass{ | |
| #region MyRegion | |
| #endregion | |
| }"); | |
| //Descend into all node children | |
| //Descend into all trivia children | |
| var regionNodes = tree.GetRoot().DescendantNodes(descendIntoChildren: null, descendIntoTrivia true).OfType<RegionDirectiveTriviaSyntax>(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment