I've got a Package for Vs2010 that currently follows
EnvDTE=>Solution=>Projects=>CodeModel=>CodeElements
to do the following recursively and find classes
var q = elements.Cast<CodeElement>()
.Where(x => x is CodeClass || x is CodeNamespace)
.Where(x => x.Name.StartsWith("System") == false)
.Where(x=>x.Name.StartsWith("Infragistics")==false)
.Where(x=>x.Name.StartsWith("Microsoft")==false)
.Where(x => x.Name.StartsWith("ICSharpCode")==false);
It runs fairly slowly, is there a way to restrict this query/search to only classes/types defined within the current project?
As I understand it FileCodeModel
is neither useful nor appropriate since that would require opening every project Item.