示例#1
0
            public string ReadRecord()
            {
                if (reader.ShouldLoadBuffer(matcher.Size))
                {
                    reader.LoadBuffer();
                }
                while (!matcher.IsMatch() && reader.Read())
                {
                    builder.Append(reader.Current);
                    if (reader.ShouldLoadBuffer(matcher.Size))
                    {
                        reader.LoadBuffer();
                    }
                }
                string record = builder.ToString();

                builder.Clear();
                return(record);
            }
示例#2
0
        private TokenType getUnquotedToken()
        {
            if (reader.ShouldLoadBuffer(separatorLength))
            {
                reader.LoadBuffer();
            }
            TokenType tokenType = getSeparator();

            while (tokenType == TokenType.Normal)
            {
                reader.Read();
                token.Append(reader.Current);
                if (reader.ShouldLoadBuffer(separatorLength))
                {
                    reader.LoadBuffer();
                }
                tokenType = getSeparator();
            }
            trimTokenEnd();
            addToken();
            return(tokenType);
        }