private void AddBlockGroupToBlock(IItemFilterBlock block, string inputString) { var blockGroupText = GetTextAfterFirstComment(inputString); var blockGroups = blockGroupText.Split(new[] { " - " }, StringSplitOptions.RemoveEmptyEntries) .Select(s => s.Trim()) .ToList(); if (blockGroups.Count(b => !string.IsNullOrEmpty(b.Trim())) > 0) { block.BlockGroup = _blockGroupHierarchyBuilder.IntegrateStringListIntoBlockGroupHierarchy(blockGroups); block.BlockGroup.IsChecked = block.Action == BlockAction.Show; } }
private void AddBlockGroupToBlock(IItemFilterBlock block, string inputString) { var blockGroupStart = inputString.IndexOf("#", StringComparison.Ordinal); if (blockGroupStart <= 0) { return; } var blockGroupText = inputString.Substring(blockGroupStart + 1); var blockGroups = blockGroupText.Split('-').ToList(); if (blockGroups.Count(b => !string.IsNullOrEmpty(b.Trim())) > 0) { block.BlockGroup = _blockGroupHierarchyBuilder.IntegrateStringListIntoBlockGroupHierarchy(blockGroups); block.BlockGroup.IsChecked = block.Action == BlockAction.Show; } }