TryParseValueFromV8Xml() приватный Метод

private TryParseValueFromV8Xml ( Session session, string strValue, object &value ) : bool
session Session
strValue string
value object
Результат bool
Пример #1
0
        /// <summary>
        /// Parse V8Xml value
        /// </summary>
        /// <param name="valueTag"></param>
        /// <param name="value"></param>
        /// <returns></returns>
        internal bool TryParseV8XmlValue(XmlElement valueTag, out object value)
        {
            if (valueTag.GetAttribute(V8XmlXsiNilAttr) == "true")
            {
                value = null;
                return(true);
            }

            string typeStr = valueTag.GetAttribute(V8XmlXsiTypeAttr);

            {
                TypeInfo valueType = TypeInfo.LoadFromV8Xml(typeStr);
                if (valueType != null &&
                    valueType.Type != TypeEnum.Unknown &&
                    valueType.TryParseValueFromV8Xml(Session, valueTag.InnerText, out value)
                    )
                {
                    return(true);
                }
            }

            foreach (var valueType in Types)
            {
                if (valueType.TryParseValueFromV8Xml(Session, valueTag.InnerText, out value))
                {
                    return(true);
                }
            }

            value = null;
            return(false);
        }