public void Dispose()
 {
     if (_isInUse)
     {
         CharIteratorPool.Return(this);
     }
 }
Пример #2
0
 public static ICharIterator ToIterator(this StringBuilder value, int offset, int count)
 {
     return(CharIteratorPool.Rent(value, offset, count));
 }
Пример #3
0
 public static ICharIterator ToRepeatingIterator(this char highSurrogate, char lowSurrogate, int length)
 {
     return(CharIteratorPool.RentRepeater(highSurrogate, lowSurrogate, length));
 }
Пример #4
0
 public static ICharIterator ToRepeatingIterator(this char value, int length)
 {
     return(CharIteratorPool.RentRepeater(value, length));
 }
Пример #5
0
 public static ICharIterator ToIterator(this char highSurrogate, char lowSurrogate)
 {
     return(CharIteratorPool.Rent(highSurrogate, lowSurrogate));
 }
Пример #6
0
 public static ICharIterator ToIterator(this char value)
 {
     return(CharIteratorPool.Rent(value));
 }
Пример #7
0
 public SizeF GetGlyphs(StringBuilder text, int offset, int count, ICollection <Glyph> output)
 {
     using (var iterator = CharIteratorPool.Rent(text, offset, count))
         return(GetGlyphs(iterator, output));
 }
Пример #8
0
        public IEnumerator <Glyph> GetGlyphs(string text, int offset, int count, Vector2 position = default)
        {
            var iterator = CharIteratorPool.Rent(text, offset, count);

            return(GlyphEnumeratorPool.Rent(this, iterator, position));
        }