public IEnumerable <WixComponentNode> EnumerateComponents([NotNull] IDictionary <string, WixComponentGroupNode> componentGroupNodes, [NotNull] IDictionary <string, WixComponentNode> componentNodes) { var byComponentGroupRef = ComponentGroupRefs.Select(componentGroupNodes.GetValueOrDefault) .Where(item => item != null) .SelectMany(cg => cg.EnumerateComponents(componentGroupNodes, componentNodes)); var byComponentRef = ComponentRefs.Select(componentNodes.GetValueOrDefault) .Where(item => item != null); var children = Components.Select(componentNodes.GetValueOrDefault) .Where(item => item != null); return(byComponentGroupRef.Concat(byComponentRef).Concat(children)); }
public IEnumerable <WixComponentNode> EnumerateComponents(IDictionary <string, WixComponentGroupNode> componentGroupNodes, IDictionary <string, WixComponentNode> componentNodes) { var byComponentGroupRef = ComponentGroupRefs.Select(componentGroupNodes.GetValueOrDefault) .ExceptNullItems() .SelectMany(cg => cg.EnumerateComponents(componentGroupNodes, componentNodes)); var byComponentRef = ComponentRefs.Select(componentNodes.GetValueOrDefault) .ExceptNullItems(); var children = Components.Select(componentNodes.GetValueOrDefault) .ExceptNullItems(); return(byComponentGroupRef.Concat(byComponentRef).Concat(children)); }
public IEnumerable <WixFileNode> EnumerateInstalledFiles([NotNull] IDictionary <string, WixComponentGroupNode> componentGroupNodes, [NotNull] IDictionary <string, WixComponentNode> componentNodes, [NotNull] IDictionary <string, WixFileNode> fileNodes) { var byComponentGroupRef = ComponentGroupRefs.Select(componentGroupNodes.GetValueOrDefault) .Where(item => item != null) .SelectMany(cg => cg.EnumerateComponents(componentGroupNodes, componentNodes)); var byComponentRef = ComponentRefs.Select(componentNodes.GetValueOrDefault) .Where(item => item != null); var children = Components.Select(componentNodes.GetValueOrDefault) .Where(item => item != null); var files = byComponentGroupRef.Concat(byComponentRef).Concat(children).SelectMany(c => c?.EnumerateFiles(fileNodes)); if (Parent != null) { files = Parent.EnumerateInstalledFiles(componentGroupNodes, componentNodes, fileNodes).Concat(files); } return(files); }