Example #1
0
        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);
            }
        }
Example #2
0
        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);
        }
Example #3
0
        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);
        }