private void GetOutputSatellites(PublishInfo[] publishInfos, ref List <ITaskItem> assemblyList) { FileMap satelliteMap = new FileMap(); if (_satelliteAssemblies != null) { foreach (ITaskItem item in _satelliteAssemblies) { item.SetMetadata("AssemblyType", "Satellite"); satelliteMap.Add(item, true); } } // Apply PublishInfo state from PublishFile items... foreach (PublishInfo publishInfo in publishInfos) { string key = publishInfo.key + ".dll"; MapEntry entry = satelliteMap[key]; if (entry != null) { entry.publishInfo = publishInfo; } else { Log.LogWarningWithCodeFromResources("ResolveManifestFiles.PublishFileNotFound", publishInfo.key); } } // Go through the AssemblyMap and determine which items get added to ouput SatelliteList based // on computed PublishFlags for each item... foreach (MapEntry entry in satelliteMap) { // If PublishInfo didn't come from a PublishFile item, then construct PublishInfo from the item if (entry.publishInfo == null) { entry.publishInfo = new PublishInfo(); } CultureInfo satelliteCulture = GetItemCulture(entry.item); PublishFlags flags = PublishFlags.GetSatelliteFlags(entry.publishInfo.state, satelliteCulture, _targetCulture, _includeAllSatellites); if (flags.IsPublished && string.Equals(entry.publishInfo.includeHash, "false", StringComparison.OrdinalIgnoreCase) && SigningManifests == true) { _canPublish = false; } if (flags.IsPublished) { assemblyList.Add(CreateAssemblyItem(entry.item, entry.publishInfo.group, entry.publishInfo.targetPath, entry.publishInfo.includeHash)); } else if (flags.IsPrerequisite) { assemblyList.Add(CreatePrerequisiteItem(entry.item)); } } }
private void GetOutputSatellites(PublishInfo[] publishInfos, ref List <ITaskItem> assemblyList) { FileMap map = new FileMap(); if (this.satelliteAssemblies != null) { foreach (ITaskItem item in this.satelliteAssemblies) { item.SetMetadata("AssemblyType", "Satellite"); map.Add(item, true); } } foreach (PublishInfo info in publishInfos) { string str = info.key + ".dll"; MapEntry entry = map[str]; if (entry != null) { entry.publishInfo = info; } else { base.Log.LogWarningWithCodeFromResources("ResolveManifestFiles.PublishFileNotFound", new object[] { info.key }); } } foreach (MapEntry entry2 in (IEnumerable)map) { if (entry2.publishInfo == null) { entry2.publishInfo = new PublishInfo(); } CultureInfo itemCulture = GetItemCulture(entry2.item); PublishFlags flags = PublishFlags.GetSatelliteFlags(entry2.publishInfo.state, itemCulture, this.targetCulture, this.includeAllSatellites); if ((flags.IsPublished && string.Equals(entry2.publishInfo.includeHash, "false", StringComparison.OrdinalIgnoreCase)) && this.SigningManifests) { this.canPublish = false; } if (flags.IsPublished) { assemblyList.Add(CreateAssemblyItem(entry2.item, entry2.publishInfo.group, entry2.publishInfo.targetPath, entry2.publishInfo.includeHash)); } else if (flags.IsPrerequisite) { assemblyList.Add(CreatePrerequisiteItem(entry2.item)); } } }