C# Класс ICSharpCode.NRefactory.CSharp.Resolver.DetectSkippableNodesNavigator

When an IResolveVisitorNavigator is searching for specific nodes (e.g. all IdentifierExpressions), it has to scan the whole syntax tree for those nodes. However, scanning in the ResolveVisitor is expensive (e.g. any lambda that is scanned must be resolved), so it makes sense to detect when a whole subtree is scan-only, and skip that tree instead. The DetectSkippableNodesNavigator performs this job by running the input IResolveVisitorNavigator over the whole AST, and detecting subtrees that are scan-only, and replaces them with Skip.
Наследование: IResolveVisitorNavigator
Показать файл Открыть проект Примеры использования класса

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

Метод Описание
DetectSkippableNodesNavigator ( IResolveVisitorNavigator navigator, AstNode root ) : System.Collections.Generic
ProcessConversion ( Expression expression, ResolveResult result, Conversion conversion, IType targetType ) : void
Resolved ( AstNode node, ResolveResult result ) : void
Scan ( AstNode node ) : ResolveVisitorNavigationMode

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

Метод Описание
Init ( AstNode node ) : bool

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

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

public DetectSkippableNodesNavigator ( IResolveVisitorNavigator navigator, AstNode root ) : System.Collections.Generic
navigator IResolveVisitorNavigator
root AstNode
Результат System.Collections.Generic

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

public ProcessConversion ( Expression expression, ResolveResult result, Conversion conversion, IType targetType ) : void
expression Expression
result ResolveResult
conversion Conversion
targetType IType
Результат void

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

public Resolved ( AstNode node, ResolveResult result ) : void
node AstNode
result ResolveResult
Результат void

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

public Scan ( AstNode node ) : ResolveVisitorNavigationMode
node AstNode
Результат ResolveVisitorNavigationMode