public void Handle() { char charTohandle = _CSVDriver.GetNextCharacter(); if (charTohandle == ',') { _CSVDriver.SetStateToEndState(); } else if (charTohandle == '"') { //Add this quote, this is the only place quotes are wrote into the string _CSVDriver.AppendToCurrentCell(charTohandle); _CSVDriver.SetStateToQuoteState(); } else { _CSVDriver.AppendToCurrentCell(charTohandle); _CSVDriver.SetStateToDefaultState(); } }
public void Handle() { char charTohandle = _CSVDriver.GetNextCharacter(); if (charTohandle == '"') { //Eat this quote, do not add it into current word _CSVDriver.SetStateToSecondQuoteState(); } else { _CSVDriver.AppendToCurrentCell(charTohandle); } }