Quantcast
Channel: SharpDevelop Community
Viewing all articles
Browse latest Browse all 1764

NRefactory find all types inhereting certain base class

$
0
0

Im trying to render Javascript from a T4 template, the javascript should reflect classes that inherit a specific base class. I've gotten this far but the types are unresolved so Im guessing im doing something wrong.

 

            var parse = newCSharpParser(); 

            var tree = Directory.GetFiles(projectPath, "*.cs", SearchOption.AllDirectories)

                                .Select(f => parse.Parse(File.ReadAllText(f), f).ToTypeSystem()); 

 

            var project = newCSharpProjectContent();

            project.AddOrUpdateFiles(tree);

            varcompilation = project.CreateCompilation();

            var type = compilation.FindType(newFullTypeName("Commands.Command"));


Viewing all articles
Browse latest Browse all 1764

Trending Articles