❔ How to correctly use Roslyn to parse RegionDirectiveTriviaSyntax in a project?

I would like to ask a question about parsing syntax tree for #region preprocessor directive. For example, for the simple code shown in the picture, I have tried several methods but failed to parse the SyntaxNode for the #region block. Do I need to set any special options?
Here's the parsing method I'm currently using, but it doesn't seem to be able to parse it out no matter what I try. However, the syntax analyzer that comes with Visual Studio can see the relevant Node.
image.png
LTVA4EOOIGMSYN.png
Was this page helpful?