Ejemplo n.º 1
0
        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();
            }
        }
Ejemplo n.º 2
0
        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);
            }
        }