C# Класс Rosetta.AST.ProgramASTWalker

Walks a program AST node.
Наследование: ASTWalker, IASTWalker
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
program Rosetta.Translation.ProgramTranslationUnit

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

Метод Описание
Create ( CSharpSyntaxNode node, ASTWalkerContext context = null, Microsoft.CodeAnalysis.SemanticModel semanticModel = null ) : ProgramASTWalker

Factory method for class ProgramASTWalker.

ProgramASTWalker ( ProgramASTWalker other ) : System

Copy initializes a new instance of the ProgramASTWalker class.

For testability.

VisitClassDeclaration ( Microsoft.CodeAnalysis.CSharp.Syntax.ClassDeclarationSyntax node ) : void

This will cause an AST walker to be created, thus we don't need to go further deeper in the tree by visiting the node.

VisitInterfaceDeclaration ( InterfaceDeclarationSyntax node ) : void

VisitNamespaceDeclaration ( Microsoft.CodeAnalysis.CSharp.Syntax.NamespaceDeclarationSyntax node ) : void

This will cause an AST walker to be created, thus we don't need to go further deeper in the tree by visiting the node.

Walk ( ) : ITranslationUnit

Walk the whole tree starting from specified CSharpSyntaxNode and build the translation unit tree necessary for generating TypeScript output.

Защищенные методы

Метод Описание
InvokeClassDeclarationVisited ( object sender, WalkerEventArgs e ) : void
InvokeEnumDeclarationVisited ( object sender, WalkerEventArgs e ) : void
InvokeInterfaceDeclarationVisited ( object sender, WalkerEventArgs e ) : void
InvokeNamespaceDeclarationVisited ( object sender, WalkerEventArgs e ) : void
ProgramASTWalker ( CSharpSyntaxNode node, ProgramTranslationUnit program, Microsoft.CodeAnalysis.SemanticModel semanticModel ) : System

Initializes a new instance of the ProgramASTWalker class.

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

Метод Описание
CreateWalkingContext ( ) : ASTWalkerContext

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

Create() публичный статический Метод

Factory method for class ProgramASTWalker.
public static Create ( CSharpSyntaxNode node, ASTWalkerContext context = null, Microsoft.CodeAnalysis.SemanticModel semanticModel = null ) : ProgramASTWalker
node CSharpSyntaxNode Used to initialize the walker.
context ASTWalkerContext The walking context.
semanticModel Microsoft.CodeAnalysis.SemanticModel The semantic model.
Результат ProgramASTWalker

InvokeClassDeclarationVisited() защищенный Метод

protected InvokeClassDeclarationVisited ( object sender, WalkerEventArgs e ) : void
sender object
e WalkerEventArgs
Результат void

InvokeEnumDeclarationVisited() защищенный Метод

protected InvokeEnumDeclarationVisited ( object sender, WalkerEventArgs e ) : void
sender object
e WalkerEventArgs
Результат void

InvokeInterfaceDeclarationVisited() защищенный Метод

protected InvokeInterfaceDeclarationVisited ( object sender, WalkerEventArgs e ) : void
sender object
e WalkerEventArgs
Результат void

InvokeNamespaceDeclarationVisited() защищенный Метод

protected InvokeNamespaceDeclarationVisited ( object sender, WalkerEventArgs e ) : void
sender object
e WalkerEventArgs
Результат void

ProgramASTWalker() защищенный Метод

Initializes a new instance of the ProgramASTWalker class.
protected ProgramASTWalker ( CSharpSyntaxNode node, ProgramTranslationUnit program, Microsoft.CodeAnalysis.SemanticModel semanticModel ) : System
node CSharpSyntaxNode
program Rosetta.Translation.ProgramTranslationUnit
semanticModel Microsoft.CodeAnalysis.SemanticModel The semantic model.
Результат System

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

Copy initializes a new instance of the ProgramASTWalker class.
For testability.
public ProgramASTWalker ( ProgramASTWalker other ) : System
other ProgramASTWalker
Результат System

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

This will cause an AST walker to be created, thus we don't need to go further deeper in the tree by visiting the node.
public VisitClassDeclaration ( Microsoft.CodeAnalysis.CSharp.Syntax.ClassDeclarationSyntax node ) : void
node Microsoft.CodeAnalysis.CSharp.Syntax.ClassDeclarationSyntax
Результат void

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

public VisitInterfaceDeclaration ( InterfaceDeclarationSyntax node ) : void
node InterfaceDeclarationSyntax
Результат void

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

This will cause an AST walker to be created, thus we don't need to go further deeper in the tree by visiting the node.
public VisitNamespaceDeclaration ( Microsoft.CodeAnalysis.CSharp.Syntax.NamespaceDeclarationSyntax node ) : void
node Microsoft.CodeAnalysis.CSharp.Syntax.NamespaceDeclarationSyntax
Результат void

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

Walk the whole tree starting from specified CSharpSyntaxNode and build the translation unit tree necessary for generating TypeScript output.
public Walk ( ) : ITranslationUnit
Результат ITranslationUnit

Описание свойств

program защищенное свойство

protected ProgramTranslationUnit,Rosetta.Translation program
Результат Rosetta.Translation.ProgramTranslationUnit