/// <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 VisitMethodDeclaration(MethodDeclarationSyntax node) { var methodWalker = MethodASTWalker.Create(node, this.CreateWalkingContext(), this.semanticModel); var translationUnit = methodWalker.Walk(); this.classDeclaration.AddMethodDeclaration(translationUnit); this.InvokeMethodDeclarationVisited(this, new WalkerEventArgs()); }
/// <summary> /// /// </summary> /// <param name="node"></param> public override void VisitMethodDeclaration(MethodDeclarationSyntax node) { base.VisitMethodDeclaration(node); var methodWalker = MethodASTWalker.Create(node); var translationUnit = methodWalker.Walk(); this.classDeclaration.AddMethodDeclaration(translationUnit); this.InvokeMethodDeclarationVisited(this, new WalkerEventArgs()); }
/// <summary> /// Copy initializes a new instance of the <see cref="MethodASTWalker"/> class. /// </summary> /// <param name="other"></param> /// <remarks> /// For testability. /// </remarks> public MethodASTWalker(MethodASTWalker other) : base(other) { this.methodDeclaration = other.methodDeclaration; }