internal static Project GetProjectFromGuid(DTE dte, IServiceProvider provider, Guid guid) { return(DteHelperEx.FindProject(dte, delegate(Project match) { return guid == GetProjectGuid(provider, match); })); }
// This method fix the problem with GAx that founds a SolutionFolder as a project private Project FindProjectByNameEx(DTE dte, string projectName) { return(DteHelperEx.FindProject(dte, new Predicate <Project>(delegate(Project internalProject) { return internalProject.Name == projectName && !(internalProject.Object is SolutionFolder); }))); }
private Project GetSourceProject(Web.AssemblyReference reference) { Project sourceProject = null; if (reference.ReferenceKind != Web.AssemblyReferenceType.AssemblyReferenceConfig) { sourceProject = DteHelperEx.FindProject(reference.DTE, new Predicate <Project>(delegate(Project match) { return((match.Kind == VSLangProj.PrjKind.prjKindCSharpProject || match.Kind == VSLangProj.PrjKind.prjKindVBProject) && match.Name.Equals(reference.Name, StringComparison.OrdinalIgnoreCase)); })); } return(sourceProject); }