C# Класс Rosetta.Tests.Utils.NodeLocator

Locates nodes in an AST.
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
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.

Приватные методы

Метод Описание
ValidateInputType ( Type type ) : void

Описание методов

LocateAll() публичный Метод

Gets all occurrances of a node type in the AST.
public LocateAll ( Type nodeType ) : IEnumerable
nodeType System.Type The node type to look for.
Результат IEnumerable

LocateFirst() публичный Метод

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.
Результат Microsoft.CodeAnalysis.SyntaxNode

LocateLast() публичный Метод

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.
Результат Microsoft.CodeAnalysis.SyntaxNode

NodeLocator() публичный Метод

Initializes a new instance of the NodeLocator class.
public NodeLocator ( Microsoft.CodeAnalysis.SyntaxNode syntaxNode ) : System
syntaxNode Microsoft.CodeAnalysis.SyntaxNode
Результат System

NodeLocator() публичный Метод

Initializes a new instance of the NodeLocator class.
public NodeLocator ( Microsoft.CodeAnalysis.SyntaxTree syntaxTree ) : System
syntaxTree Microsoft.CodeAnalysis.SyntaxTree
Результат System