示例#1
0
        /**
         *Function that parses the result string into a WordError object.
         **/
        private WordError parseResult(String result)
        {
            string[] tokens = result.Split(new char[] { ' ' }, 4);
            tokens[3] = tokens[3].Replace("[", "");
            tokens[3] = tokens[3].Replace("]", "");
            tokens[3] = tokens[3].Replace("\r\n", "");
            string[] suggestions;
            if (!tokens[3].Equals(""))
            {
                suggestions = tokens[3].Split(new char[] { ' ' });
            }
            else
            {
                suggestions = null;
            }

            WordError wordError = new WordError(Convert.ToInt32(tokens[0]) + 1, tokens[1], Convert.ToInt32(tokens[2]), suggestions);
            return wordError;
        }
示例#2
0
 public void add(WordError wordError)
 {
     errorList.Add(wordError);
 }