Example #1
0
        public static Syllable FromXElement(XElement x)
        {
            Syllable syllable = new Syllable();

            syllable.SyllableType = XmlTools.GetEnumAttributeValue <SyllabicType>(x, "Type");
            syllable.Value        = XmlTools.GetStringAttributeValue(x, "Value");

            return(syllable);
        }
Example #2
0
        public static SimpleWord FromXElement(XElement x)
        {
            SimpleWord word = new SimpleWord();

            foreach (XElement xSyllable in x.Elements("Syllable"))
            {
                word.Syllables.Add(Syllable.FromXElement(xSyllable));
            }

            return(word);
        }
        public SimpleWord GetSimpleWord(int nLength)
        {
            SimpleWord sw = new SimpleWord();

            while (sw.ToString().Length <= nLength)
            {
                Syllable s = GetSyllable();
                sw.Syllables.Add(s);
            }

            return(sw);
        }