Inheritance: LazyTextReader
Esempio n. 1
0
 public static void ClearForCurrentThread()
 {
     cache = null;
     _buffer = null;
     charArrayReader = null;
     clrStringReader = null;
     reseekablestringBuilderReader = null;
     stringBuilderReader = null;
     valueStringReader = null;
 }
Esempio n. 2
0
 public static void ClearForCurrentThread()
 {
     cache           = null;
     _buffer         = null;
     charArrayReader = null;
     clrStringReader = null;
     reseekablestringBuilderReader = null;
     stringBuilderReader           = null;
     valueStringReader             = null;
 }
Esempio n. 3
0
        public static string SubstringCached(this StringBuilder str, int startIndex, int length)
        {
#if SALTARELLE
            string text = str.ToString();
            if (startIndex != 0 || length != text.Length)
            {
                return(text.Substr(startIndex, length));
            }
            return(text);
#else
            var reader = stringBuilderReader ?? (stringBuilderReader = new StringBuilderReader());
            reader.StringBuilder = str;
            string result = reader.SubstringCached(startIndex, length);
            reader.StringBuilder = null;
            return(result);
#endif
        }
Esempio n. 4
0
        public static string SubstringCached(this StringBuilder str, int startIndex, int length)
        {
#if SALTARELLE
            string text = str.ToString();
            if (startIndex != 0 || length != text.Length)
            {
                return text.Substr(startIndex, length);
            }
            return text;
#else
            var reader = stringBuilderReader ?? (stringBuilderReader = new StringBuilderReader());
            reader.StringBuilder = str;
            string result = reader.SubstringCached(startIndex, length);
            reader.StringBuilder = null;
            return result;
#endif
        }