Пример #1
0
        /// <summary>Create a descendant component object.</summary>
        /// <param name="index">Index of the component.</param>
        /// <returns>Component object.</returns>
        private ComponentParser CreateComponent(int index)
        {
            if (index < 1)
            {
                throw new ElementException(ErrorCode.ComponentIndexMustBeGreaterThanZero);
            }

            var result = new ComponentParser(this, index - 1, index);

            return(result);
        }
Пример #2
0
        /// <summary>Create a descendant component object.</summary>
        /// <param name="index">Index of the component.</param>
        /// <returns>Component object.</returns>
        private ComponentParser CreateComponent(int index)
        {
            if (index < 1)
            {
                throw new ElementException(ErrorCode.ComponentIndexMustBeGreaterThanZero);
            }

            var result = new ComponentParser(this, index - 1, index);
            return result;
        }