Ejemplo n.º 1
0
        public CompositeResourceFilter Clone()
        {
            var clone = new CompositeResourceFilter();
            foreach (IResourceFilter filter in _filters)
            {
                clone.AddFilter(filter);
            }

            return clone;
        }
Ejemplo n.º 2
0
        public CompositeResourceFilter Clone()
        {
            var clone = new CompositeResourceFilter();

            foreach (IResourceFilter filter in _filters)
            {
                clone.AddFilter(filter);
            }

            return(clone);
        }
Ejemplo n.º 3
0
        private void EachTemplate(Func <GroupTemplateContext, bool> handler)
        {
            var excludeFilter = new CompositeResourceFilter();

            //add a filter to exclude all resources that match the consolidated url of a group
            excludeFilter.AddFilter(new ConsolidatedUrlFilter(_templates));
            foreach (var groupTemplate in _templates)
            {
                var templateContext = groupTemplate.WithContext(excludeFilter);
                if (!handler(templateContext))
                {
                    break;
                }

                excludeFilter.AddFilter(groupTemplate);
            }
        }
Ejemplo n.º 4
0
 public void Init()
 {
     _instance = new CompositeResourceFilter();
 }
Ejemplo n.º 5
0
 public void Init()
 {
     _instance = new CompositeResourceFilter();
 }
Ejemplo n.º 6
0
        private void EachTemplate(Func<GroupTemplateContext,bool> handler)
        {
            var excludeFilter = new CompositeResourceFilter();
            //add a filter to exclude all resources that match the consolidated url of a group
            excludeFilter.AddFilter(new ConsolidatedUrlFilter(_templates));
            foreach (var groupTemplate in _templates)
            {
                var templateContext = groupTemplate.WithContext(excludeFilter);
                if(!handler(templateContext))
                    break;

                if(MutuallyExclusiveGroups)
                    excludeFilter.AddFilter(groupTemplate);
            }
        }