public static Create ( CSharpSyntaxNode node, |
||
node | CSharpSyntaxNode | |
context | The walking context. | |
semanticModel | Microsoft.CodeAnalysis.SemanticModel | The semantic model. |
return |
/// <summary> /// /// </summary> /// <param name="node"></param> /// <remarks> /// 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. /// </remarks> public override void VisitClassDeclaration(ClassDeclarationSyntax node) { var classDefinitionWalker = ClassDefinitionASTWalker.Create(node, this.CreateWalkingContext(), this.semanticModel); var translationUnit = classDefinitionWalker.Walk(); this.module.AddClass(translationUnit); this.InvokeClassDeclarationVisited(this, new WalkerEventArgs()); }
/// <summary> /// /// </summary> /// <param name="node"></param> /// <remarks> /// 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. /// </remarks> public override void VisitClassDeclaration(ClassDeclarationSyntax node) { var classDefinitionWalker = ClassDefinitionASTWalker.Create(node, this.CreateWalkingContext(), this.semanticModel); classDefinitionWalker.Logger = this.Logger; var translationUnit = classDefinitionWalker.Walk(); this.program.AddContent(translationUnit); this.LogVisitClassDeclaration(node); // Logging this.InvokeClassDeclarationVisited(this, new WalkerEventArgs()); }