Exemplo n.º 1
0
        /// <summary>
        /// This method returns the property at the path specified.
        /// </summary>
        /// <param name="path">The property path.</param>
        /// <param name="fDef">The default value.</param>
        /// <returns>The property value.</returns>
        public bool GetPropBool(string path, bool fDef)
        {
            XmlNode node;
            XmlProp prop;
            string  strNode;
            string  strProp;
            bool    v;

            SplitPath(path, out strNode, out strProp);
            node = GetNode(strNode);
            if (node == null)
            {
                return(fDef);
            }

            prop = node.Properties[strProp];
            if (prop == null)
            {
                return(fDef);
            }

            if (!XmlProp.Get(out v, prop.Value))
            {
                return(fDef);
            }

            return(v);
        }
Exemplo n.º 2
0
        /// <summary>
        /// This method returns the property at the path specified.
        /// </summary>
        /// <param name="path">The property path.</param>
        /// <param name="def">The default value.</param>
        /// <returns>The property value.</returns>
        public XmlProp GetPropObj(string path, XmlProp def)
        {
            XmlNode node;
            XmlProp prop;
            string  strNode;
            string  strProp;

            SplitPath(path, out strNode, out strProp);
            node = GetNode(strNode);
            if (node == null)
            {
                return(def);
            }

            prop = node.Properties[strProp];
            if (prop == null)
            {
                return(def);
            }

            return(prop);
        }
Exemplo n.º 3
0
 /// <summary>
 /// This method appends the node passed to the array.
 /// </summary>
 /// <param name="node"></param>
 public void Add(XmlProp node)
 {
     base.Add(node);
 }