C# Class Rosetta.Tests.Utils.NodeLocator

Locates nodes in an AST.
Afficher le fichier Open project: andry-tino/Rosetta Class Usage Examples

Méthodes publiques

Méthode Description
LocateAll ( Type nodeType ) : IEnumerable

Gets all occurrances of a node type in the AST.

LocateFirst ( Type nodeType ) : Microsoft.CodeAnalysis.SyntaxNode

Gets the first occurrance of a node type in the AST.

LocateLast ( Type nodeType ) : Microsoft.CodeAnalysis.SyntaxNode

Gets the last occurrance of a node type in the AST.

NodeLocator ( Microsoft.CodeAnalysis.SyntaxNode syntaxNode ) : System

Initializes a new instance of the NodeLocator class.

NodeLocator ( Microsoft.CodeAnalysis.SyntaxTree syntaxTree ) : System

Initializes a new instance of the NodeLocator class.

Private Methods

Méthode Description
ValidateInputType ( Type type ) : void

Method Details

LocateAll() public méthode

Gets all occurrances of a node type in the AST.
public LocateAll ( Type nodeType ) : IEnumerable
nodeType System.Type The node type to look for.
Résultat IEnumerable

LocateFirst() public méthode

Gets the first occurrance of a node type in the AST.
public LocateFirst ( Type nodeType ) : Microsoft.CodeAnalysis.SyntaxNode
nodeType System.Type The node type to look for.
Résultat Microsoft.CodeAnalysis.SyntaxNode

LocateLast() public méthode

Gets the last occurrance of a node type in the AST.
public LocateLast ( Type nodeType ) : Microsoft.CodeAnalysis.SyntaxNode
nodeType System.Type The node type to look for.
Résultat Microsoft.CodeAnalysis.SyntaxNode

NodeLocator() public méthode

Initializes a new instance of the NodeLocator class.
public NodeLocator ( Microsoft.CodeAnalysis.SyntaxNode syntaxNode ) : System
syntaxNode Microsoft.CodeAnalysis.SyntaxNode
Résultat System

NodeLocator() public méthode

Initializes a new instance of the NodeLocator class.
public NodeLocator ( Microsoft.CodeAnalysis.SyntaxTree syntaxTree ) : System
syntaxTree Microsoft.CodeAnalysis.SyntaxTree
Résultat System