Пример #1
0
        private IEnumerable <PreCompiledResourceGroup> ConsolidateGroupsInternal(ResourceType resourceType,
                                                                                 IResourceGroupManager groupTemplates,
                                                                                 Action <ICompiledResource> onCompiled)
        {
            if (!groupTemplates.Any())
            {
                return(Enumerable.Empty <PreCompiledResourceGroup>());
            }

            var allResources = _finder.FindResources(resourceType);

            var preConsolidatedGroups = new List <PreCompiledResourceGroup>();

            groupTemplates.EachGroup(allResources, group =>
            {
                var consolidatedResource = CompileGroup(group);
                onCompiled(consolidatedResource);
                var preConsolidatedGroup = new PreCompiledResourceGroup
                {
                    ConsolidatedUrl = group.ConsolidatedUrl,
                    Resources       = consolidatedResource.Resources.Select(resource => resource.VirtualPath).ToList()
                };
                preConsolidatedGroups.Add(preConsolidatedGroup);
            });

            return(preConsolidatedGroups);
        }
Пример #2
0
        private IEnumerable<PreCompiledResourceGroup> ConsolidateGroupsInternal(ResourceType resourceType,
            IResourceGroupManager groupTemplates,
            Action<ICompiledResource> onCompiled)
        {
            if (!groupTemplates.Any())
                return Enumerable.Empty<PreCompiledResourceGroup>();

            var allResources = _finder.FindResources(resourceType).ToArray();

            var preConsolidatedGroups = new List<PreCompiledResourceGroup>();
            groupTemplates.EachGroup(allResources, group =>
            {
                var consolidatedResource = CompileGroup(group);
                onCompiled(consolidatedResource);
                var preConsolidatedGroup = new PreCompiledResourceGroup
                {
                    ConsolidatedUrl = group.ConsolidatedUrl,
                    Resources = consolidatedResource.Resources.Select(resource => resource.VirtualPath).ToList()
                };
                preConsolidatedGroups.Add(preConsolidatedGroup);
            });

            return preConsolidatedGroups;
        }
Пример #3
0
 public bool Any()
 {
     return(_inner.Any());
 }