public static IEnumerable <IVsHierarchy> GetProjects(this IVsSolution source) { if (source == null) { throw new ArgumentNullException(nameof(source)); } SolutionWrapper solution = new SolutionWrapper(source); return(new ProjectEnumerator(solution)); }
public static IVsHierarchy GetProject(this IVsSolution2 source, string projectName) { if (source == null) { throw new ArgumentNullException(nameof(source)); } SolutionWrapper solution = new SolutionWrapper(); ProjectEnumerator projects = new ProjectEnumerator(solution); return(projects.FindProject(projectName)); }