コード例 #1
0
        public static IEnumerable <TypeDeclaration> FindAllClasses(this CompilationUnit inode)
        {
            IndexableClassFinderVisitor v = new IndexableClassFinderVisitor();

            inode.AcceptVisitor(v, null);
            return(v.AllClasses);
        }
コード例 #2
0
        public static TypeDeclaration FindClass(this INode expected_ast, string methodName)
        {
            IndexableClassFinderVisitor v1 = new IndexableClassFinderVisitor();

            expected_ast.AcceptVisitor(v1, null);
            return(v1.Classes[methodName]);
        }