Ejemplo n.º 1
0
        internal static ImmutableArray <string> GetAllCompilationAssemblies(ReferenceInfo reference)
        {
            var transitiveCompilationAssemblies = reference.Dependencies
                                                  .SelectMany(dependency => GetAllCompilationAssemblies(dependency));

            return(reference.CompilationAssemblies
                   .Concat(transitiveCompilationAssemblies)
                   .ToImmutableArray());
        }
Ejemplo n.º 2
0
        internal static bool ContainsAnyCompilationAssembly(ReferenceInfo reference, HashSet <string> usedAssemblyFilePaths)
        {
            if (reference.CompilationAssemblies.Any(usedAssemblyFilePaths.Contains))
            {
                return(true);
            }

            return(reference.Dependencies.Any(dependency => ContainsAnyCompilationAssembly(dependency, usedAssemblyFilePaths)));
        }
Ejemplo n.º 3
0
        internal static void RemoveAllCompilationAssemblies(ReferenceInfo reference, HashSet <string> usedAssemblyFilePaths)
        {
            usedAssemblyFilePaths.ExceptWith(reference.CompilationAssemblies);

            foreach (var dependency in reference.Dependencies)
            {
                RemoveAllCompilationAssemblies(dependency, usedAssemblyFilePaths);
            }
        }
Ejemplo n.º 4
0
        internal static bool HasAnyCompilationAssembly(ReferenceInfo reference)
        {
            if (reference.CompilationAssemblies.Length > 0)
            {
                return(true);
            }

            return(reference.Dependencies.Any(HasAnyCompilationAssembly));
        }