public void Handle() { char charTohandle = _CSVDriver.GetNextCharacter(); if (charTohandle == ',') { _CSVDriver.SetStateToEndState(); } else if (charTohandle == '"') { //Eat this quote, do not add it into current word _CSVDriver.SetStateToQuoteState(); } else { _CSVDriver.AppendToCurrentCell(charTohandle); } }
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(); } }