コード例 #1
0
 public ReferenceBundle(ProjectReference parent, ProjectReference reference)
 {
     Parent = parent;
     Reference = reference;
 }
コード例 #2
0
 private List<BaseReference> MakeDependencyList(ProjectReference projectReference)
 {
     List<BaseReference> list;
     if (!_dependencies.TryGetValue(projectReference, out list))
     {
         list = new List<BaseReference>();
         _dependencies.Add(projectReference, list);
     }
     return list;
 }
コード例 #3
0
        private void AddParentDependency(ProjectReference parent, ProjectReference projectReference)
        {
            string assemblyName = projectReference.DisplayName;
            var excludeFilters = parent == null ? ExcludeRegex : ExcludeProjectReferencesRegex;
            if (!IsApplicable(excludeFilters, assemblyName))
                return;

            MakeDependencyList(projectReference);
            if (parent != null)
                AddDependency(parent, projectReference);
        }
コード例 #4
0
 private void AddDependency(ProjectReference projectReference, BaseReference baseReference)
 {
     var list = MakeDependencyList(projectReference);
     list.Add(baseReference);
 }
コード例 #5
0
        private void Process(ProjectReference parent, ProjectReference projectReference, Stack<ReferenceBundle> processStack)
        {
            ProjectReference existProject;
            if (_storage.TryGetValue(projectReference.Include, out existProject))
            {
                AddParentDependency(parent, existProject);
                return;
            }
            
            _storage.Add(projectReference.Include, projectReference);

            var parser = CreateParser(projectReference.Include);
            projectReference.Update(parser);

            AddParentDependency(parent, projectReference);

            var applicableReferences = parser
                .GetAssemblyReferences()
                .Where(reference => IsApplicable(ExcludeReferencesRegex, reference.DisplayName));
            foreach (var reference in applicableReferences)
                AddDependency(projectReference, reference);

            foreach (var reference in parser.GetProjectReferences())
            {
                reference.UpdateInclude(projectReference.Include);
                processStack.Push(new ReferenceBundle(projectReference, reference));
            }
        }