Create() public static méthode

Factory method for class ClassASTWalker.
public static Create ( CSharpSyntaxNode node, ASTWalkerContext context = null, Microsoft.CodeAnalysis.SemanticModel semanticModel = null ) : ClassASTWalker
node CSharpSyntaxNode Used to initialize the walker.
context ASTWalkerContext The walking context.
semanticModel Microsoft.CodeAnalysis.SemanticModel The semantic model.
Résultat ClassASTWalker
Exemple #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());
        }
        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());
        }
Exemple #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());
        }