Example #1
0
 /// <summary>
 /// Gets the text type from the specified <paramref name="textTypeWrapper"/>
 /// </summary>
 /// <param name="textTypeWrapper">
 /// The text type wrapper.
 /// </param>
 /// <returns>
 /// the text type from the specified <paramref name="textTypeWrapper"/>
 /// </returns>
 internal TextType GetTextType(ITextTypeWrapper textTypeWrapper)
 {
     var textType = new TextType { lang = textTypeWrapper.Locale, TypedValue = textTypeWrapper.Value };
     return textType;
 }
Example #2
0
        /// <summary>
        /// Gets the text type from the specified <paramref name="textTypeWrappers"/>
        /// </summary>
        /// <param name="textTypeWrappers">
        /// The text type wrappers list.
        /// </param>
        /// <returns>
        /// the text type array from the specified <paramref name="textTypeWrappers"/>
        /// </returns>
        internal TextType[] GetTextType(IList<ITextTypeWrapper> textTypeWrappers)
        {
            if (!ObjectUtil.ValidCollection(textTypeWrappers))
            {
                return null;
            }

            var textTypes = new TextType[textTypeWrappers.Count];
            for (int i = 0; i < textTypeWrappers.Count; i++)
            {
                TextType tt = this.GetTextType(textTypeWrappers[i]);
                textTypes[i] = tt;
            }

            return textTypes;
        }