public WebFormsNodeFilterProvider(IWebFormsCodeGroupNodeFactory nodeFactory)
 {
     Filters = new IWebFormsNodeFilter[] {
         new CodeBlockGroupingFilter(nodeFactory),
         new AddBlockBracesFilter(),
         new WrapNestedTemplatesFilter()
     };
 }
 public WebFormsNodeFilterProvider(IWebFormsCodeGroupNodeFactory nodeFactory)
 {
     Filters = new IWebFormsNodeFilter[] {
         new CodeBlockGroupingFilter(nodeFactory),
         new AddBlockBracesFilter(),
         new WrapNestedTemplatesFilter()
     };
 }
示例#3
0
        private void FilterChildNodes(IWebFormsNode rootNode, IWebFormsNodeFilter filter)
        {
            if (rootNode.Children.Count > 0)
            {
                var filterOutput = new List <IWebFormsNode>();
                foreach (var childNode in rootNode.Children)
                {
                    FilterChildNodes(childNode, filter);
                    filterOutput.AddRange(filter.Filter(childNode, filterOutput.LastOrDefault()));
                }

                rootNode.Children.Clear();
                foreach (var filteredNode in filterOutput)
                {
                    rootNode.Children.Add(filteredNode);
                }
            }
        }
示例#4
0
        private void FilterChildNodes(IWebFormsNode rootNode, IWebFormsNodeFilter filter)
        {
            if (rootNode.Children.Count > 0)
            {
                var filterOutput = new List<IWebFormsNode>();
                foreach (var childNode in rootNode.Children)
                {
                    FilterChildNodes(childNode, filter);
                    filterOutput.AddRange(filter.Filter(childNode, filterOutput.LastOrDefault()));
                }

                rootNode.Children.Clear();
                foreach (var filteredNode in filterOutput)
                {
                    rootNode.Children.Add(filteredNode);
                }
            }
        }