GuiCompare.XMLAttributeProperties.LoadData C# (CSharp) Method

LoadData() public method

public LoadData ( XmlNode node ) : void
node System.Xml.XmlNode
return void
		public override void LoadData (XmlNode node)
		{
			if (node == null)
				throw new ArgumentNullException ("node");

			if (node.ChildNodes == null)
				return;

			string ignored;

			if (!ignored_properties.TryGetValue (attribute, out ignored))
				ignored = null;

			foreach (XmlNode n in node.ChildNodes) {
				string name = n.Attributes["name"].Value;
				if (ignored != null && ignored == name)
					continue;

				if (n.Attributes["null"] != null) {
					Properties.Add (name, null);
					continue;
				}
				Properties.Add (name, n.Attributes ["value"].Value);
			}
		}

Usage Example

Ejemplo n.º 1
0
        protected override void LoadExtraData(string name, XmlNode node)
        {
            XmlNode pNode = node.SelectSingleNode("properties");

            if (IsMonoTODOAttribute(name))
            {
                isTodo = true;
                if (pNode.ChildNodes [0].Attributes ["value"] != null)
                {
                    comment = pNode.ChildNodes [0].Attributes ["value"].Value;
                }
                return;
            }

            if (MasterUtils.IsImplementationSpecificAttribute(name))
            {
                return;
            }

            if (pNode != null)
            {
                XMLAttributeProperties p = new XMLAttributeProperties(name);
                p.LoadData(pNode);

                IDictionary <string, XMLAttributeProperties> properties = Properties;
                if (properties.ContainsKey(name))
                {
                    properties [name] = p;
                }
                else
                {
                    properties.Add(name, p);
                }
            }
        }
All Usage Examples Of GuiCompare.XMLAttributeProperties::LoadData