Walks a class AST node.
상속: Microsoft.CodeAnalysis.CSharp.CSharpSyntaxWalker, IASTWalker
예제 #1
0
        /// <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 classWalker     = ClassASTWalker.Create(node, this.CreateWalkingContext(), this.semanticModel);
            var translationUnit = classWalker.Walk();

            this.program.AddContent(translationUnit);

            this.InvokeClassDeclarationVisited(this, new WalkerEventArgs());
        }
예제 #2
0
        public override void VisitClassDeclaration(ClassDeclarationSyntax node)
        {
            base.VisitClassDeclaration(node);

            var classWalker     = ClassASTWalker.Create(node);
            var translationUnit = classWalker.Walk();

            this.module.AddClass(translationUnit);

            this.InvokeClassDeclarationVisited(this, new WalkerEventArgs());
        }
예제 #3
0
        /// <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 classWalker = ClassASTWalker.Create(node, this.CreateWalkingContext(), this.semanticModel);

            classWalker.Logger = this.Logger;

            var translationUnit = classWalker.Walk();

            this.module.AddClass(translationUnit);

            this.LogVisitClassDeclaration(node); // Logging

            this.InvokeClassDeclarationVisited(this, new WalkerEventArgs());
        }
예제 #4
0
 /// <summary>
 /// Copy initializes a new instance of the <see cref="ClassASTWalker"/> class.
 /// </summary>
 /// <param name="other"></param>
 /// <remarks>
 /// For testability.
 /// </remarks>
 public ClassASTWalker(ClassASTWalker other)
     : base(other)
 {
     this.classDeclaration = other.classDeclaration;
 }
예제 #5
0
 /// <summary>
 /// Copy initializes a new instance of the <see cref="ClassASTWalker"/> class.
 /// </summary>
 /// <param name="other"></param>
 /// <remarks>
 /// For testability.
 /// </remarks>
 public ClassASTWalker(ClassASTWalker other)
     : base(other)
 {
     this.classDeclaration = other.classDeclaration;
 }