ACAT.Extensions.Default.SpellCheckers.SpellChecker.createAndAdd C# (CSharp) Method

createAndAdd() private method

Extracts word and replacement from the xml node and adds the word and its replacement to the word list.
private createAndAdd ( XmlNode node ) : void
node System.Xml.XmlNode
return void
        private void createAndAdd(XmlNode node)
        {
            var word = XmlUtils.GetXMLAttrString(node, "word").Trim();
            var replaceWith = XmlUtils.GetXMLAttrString(node, "replaceWith").Trim();

            if (!String.IsNullOrEmpty(word) &&
                !_wordList.ContainsKey(word) &&
                !String.IsNullOrEmpty(replaceWith))
            {
                _wordList.Add(word, replaceWith);
            }
        }
    }