コード例 #1
0
ファイル: FAQ.cs プロジェクト: Rickinio/roslyn
 // If you need to visit all SyntaxNodes of a particular (derived) type that appears directly
 // in a syntax tree, you can override the Visit* method corresponding to this type.
 // For example, you can override VisitIfStatement to visit all SyntaxNodes of type IfStatementSyntax.
 public override void VisitIfStatement(IfStatementSyntax node)
 {
     Results.AppendLine();
     Results.Append("Visiting ");
     Results.Append(node.GetType().Name);
     Results.Append(" (Kind = ");
     Results.Append(node.Kind().ToString());
     Results.Append("): ");
     Results.Append(node.ToString());
     base.VisitIfStatement(node);
 }