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(); }
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(); }