protected override bool ReadNext() { if (EndOfLine) //End of line or script { if (!foundGo) { builder.Append(Current); Splitter.Append(builder.ToString()); Splitter.SetParser(new SeparatorLineReader(Splitter)); return(false); } Reset(); return(true); } if (WhiteSpace) { builder.Append(Current); return(false); } if (!CharEquals('g') && !CharEquals('o')) { FoundNonEmptyCharacter(Current); return(false); } if (CharEquals('o')) { if (CharEquals('g', LastChar) && !foundGo) { foundGo = true; } else { FoundNonEmptyCharacter(Current); } } if (CharEquals('g', Current)) { if (gFound || (!char.IsWhiteSpace(LastChar) && LastChar != char.MinValue)) { FoundNonEmptyCharacter(Current); return(false); } gFound = true; } if (!HasNext && foundGo) { Reset(); return(true); } builder.Append(Current); return(false); }
protected override bool ReadNext() { if (EndOfLine) //end of line { Splitter.Append(Current); Splitter.SetParser(new SeparatorLineReader(Splitter)); return(false); } Splitter.Append(Current); return(false); }
void FoundNonEmptyCharacter(char c) { builder.Append(c); Splitter.Append(builder.ToString()); Splitter.SetParser(new SqlScriptReader(Splitter)); }