Exemple #1
0
        public List<AssemblyPartInfo> GetResourceAssemblyParts(AssemblyPartInfo assemblyPart, XapFile xap)
        {
            if (assemblyPart.AssemblyName == null)
            {
                return new List<AssemblyPartInfo>();
            }

            var resourceFileName = "/" + Path.GetFileNameWithoutExtension(assemblyPart.FileName) + ".resources.dll";
            return xap.AssemblyParts.Where(ap => ap.FileName.EndsWith(resourceFileName)).ToList();
        }
Exemple #2
0
        public IList<AssemblyPartInfo> GetRedundantAssemblyParts(string[] sources, XapFile xap)
        {
            var sourceXaps =
                sources.Where(_fileSystem.FileExists).
                    Select(file => new XapFile(file, _fileSystem)).ToList();

            var redundantAssemblyParts = sourceXaps.
                SelectMany(source => source.AssemblyParts).Distinct().Intersect(xap.AssemblyParts).
                ToList();

            return redundantAssemblyParts.Distinct().ToList();
        }