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); }
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); }