private static void AddReferences(ProjectDeclaration projectDeclaration, List <ReferencePriorityMap> references) { var projectId = projectDeclaration.ProjectId; foreach (var reference in references) { int priority = reference[projectId]; projectDeclaration.AddProjectReference(reference.ReferencedProjectId, priority); } }
private Declaration CreateProjectDeclaration(QualifiedModuleName projectQualifiedName, VBProject project) { var qualifiedName = projectQualifiedName.QualifyMemberName(project.Name); var projectId = qualifiedName.QualifiedModuleName.ProjectId; var projectDeclaration = new ProjectDeclaration(qualifiedName, project.Name); var references = _projectReferences.Where(projectContainingReference => projectContainingReference.ContainsKey(projectId)); foreach (var reference in references) { int priority = reference[projectId]; projectDeclaration.AddProjectReference(reference.ReferencedProjectId, priority); } return(projectDeclaration); }
private Declaration CreateProjectDeclaration(QualifiedModuleName projectQualifiedName, VBProject project) { var qualifiedName = projectQualifiedName.QualifyMemberName(project.Name); var projectId = qualifiedName.QualifiedModuleName.ProjectId; var projectDeclaration = new ProjectDeclaration(qualifiedName, project.Name, isBuiltIn: false); var references = new List <ReferencePriorityMap>(); foreach (var item in _projectReferences) { if (item.ContainsKey(projectId)) { references.Add(item); } } foreach (var reference in references) { int priority = reference[projectId]; projectDeclaration.AddProjectReference(reference.ReferencedProjectId, priority); } return(projectDeclaration); }