Пример #1
0
        private static List <string> GetSectionsList(IReadOnlyList <SegmentSection> segmentSections, ref int charsLength)
        {
            var items = new List <string>();

            foreach (var section in segmentSections)
            {
                if (section.RevisionMarker != null && section.RevisionMarker.Type == RevisionMarker.RevisionType.Delete)
                {
                    //ignore from the comparison process
                }
                else
                {
                    if (section.Type == SegmentSection.ContentType.Text)
                    {
                        var strLists = ReportUtils.GetTextSections(section.Content);

                        foreach (var part in strLists)
                        {
                            foreach (var letter in part)
                            {
                                items.Add(letter.ToString());
                                charsLength++;
                            }
                        }
                    }
                    else
                    {
                        charsLength++;
                        items.Add(section.Content);
                    }
                }
            }
            return(items);
        }