I am having a problem creating a way to list all the classes in my project using EnvDTE
for templating interfaces using T4 (based on naming conventions), and none of the documentation out there seems to describe how to do it. I started out with:
<#@ template debug="true" hostspecific="true" language="C#" #>
<#@ output extension=".cs" #>
<#@ Assembly name="EnvDTE" #>
<#@ Assembly name="System.Core" #>
<#@ import namespace="EnvDTE" #>
<#@ Import Namespace="System.Linq" #>
<#@ Import Namespace="System.Collections.Generic" #>
<#
var env = (DTE)((IServiceProvider)this.Host)
.GetService(typeof(EnvDTE.DTE));
... and then I started going sideways. I am able to identify my project, but I am not able to collect the classes in the project that I want to filter into a flat list for creating interfaces for.
How can I do this? I just want the classes in my project.