BTDB.IL.ILDynamicTypeDebugImpl.AddNameShorteningSection C# (CSharp) Method

AddNameShorteningSection() static private method

static private AddNameShorteningSection ( string name, List sections, int pos, int sectionEnd, StringBuilder sb ) : void
name string
sections List
pos int
sectionEnd int
sb StringBuilder
return void
        static void AddNameShorteningSection(string name, List<int> sections, int pos, int sectionEnd, StringBuilder sb)
        {
            var startIdx = sections[pos - sections[pos] - 1];
            var prevSectionPos = pos - sections[pos] - 2;
            if (prevSectionPos > 0)
                AddNameShorteningSection(name, sections, prevSectionPos, startIdx, sb);

            sb.Append(name[startIdx]);

            var skip = 0;
            for (var i = pos - sections[pos]; i < pos; i++)
                if (sections[i] < 0)
                    skip += -sections[i];
            for (var i = startIdx + 1 + skip; i < sectionEnd; i++)
                sb.Append(name[i]);
        }