public WebFormsNodeFilterProvider(IWebFormsCodeGroupNodeFactory nodeFactory) { Filters = new IWebFormsNodeFilter[] { new CodeBlockGroupingFilter(nodeFactory), new AddBlockBracesFilter(), new WrapNestedTemplatesFilter() }; }
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); } } }
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); } } }