Пример #1
0
        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));
        }
Пример #2
0
        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));
        }
Пример #3
0
        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);
        }