Пример #1
0
        /// <summary>
        /// Fills the parameter properties of this method call with the information contained in the XElement.
        /// </summary>
        /// <typeparam name="T">The XmlRpcType of the parameter.</typeparam>
        /// <param name="paramsElement">The XElement containing the information.</param>
        /// <param name="param">The parameter.</param>
        /// <returns>Whether it was successful or not.</returns>
        protected static bool parseCallParamXml <T>(XElement paramsElement, XmlRpcType <T> param)
        {
            if (!paramsElement.HasElements)
            {
                return(false);
            }

            XElement paramElement = paramsElement.Elements().First();

            if (!isValidParamElement(paramElement))
            {
                return(false);
            }

            paramElement.Remove();

            return(param.ParseXml(paramElement.Elements().First()));
        }