internal virtual void ReadXml(XmlElement xmlParent) { if ( xmlParent.Attributes != null ) { foreach ( XmlAttribute xmlAttribute in xmlParent.Attributes ) { switch ( xmlAttribute.Name ) { case "id" : _id = Convert.ToInt32(xmlAttribute.Value); break; case "timestamp" : _timestamp = Convert.ToDateTime(xmlAttribute.Value); break; case "visible" : _visible = xmlAttribute.Value; break; case "action" : _action = xmlAttribute.Value; break; case "deleted": _deleted = Convert.ToBoolean(xmlAttribute.Value); break; default: break; //throw new ApplicationException(this.GetType().Name + " - Unknown attribute : " + xmlAttribute.Name); } } } foreach ( XmlNode xmlNode in xmlParent.ChildNodes ) { if ( xmlNode.NodeType == XmlNodeType.Element ) { switch ( xmlNode.Name ) { case "nd" : nd itemnd = new nd(); itemnd.ReadXml(xmlNode as XmlElement); _ndCollection.Add(itemnd); break; case "tag" : tag itemtag = new tag(); itemtag.ReadXml(xmlNode as XmlElement); _tagCollection.Add(itemtag); break; default: break; //throw new ApplicationException(this.GetType().Name + " - Unknown element : " + xmlNode.Name); } } } }
internal virtual void ReadXml(XmlElement xmlParent) { if ( xmlParent.Attributes != null ) { foreach ( XmlAttribute xmlAttribute in xmlParent.Attributes ) { switch ( xmlAttribute.Name ) { case "id" : _id = Convert.ToUInt64(xmlAttribute.Value); break; case "timestamp" : _timestamp = Convert.ToDateTime(xmlAttribute.Value); break; case "visible" : _visible = xmlAttribute.Value; break; case "action" : _action = xmlAttribute.Value; break; case "deleted": _deleted = Convert.ToBoolean(xmlAttribute.Value); break; default: break; //throw new ApplicationException(this.GetType().Name + " - Unknown attribute : " + xmlAttribute.Name); } } } foreach ( XmlNode xmlNode in xmlParent.ChildNodes ) { if ( xmlNode.NodeType == XmlNodeType.Element ) { switch ( xmlNode.Name ) { case "nd" : nd itemnd = new nd(); itemnd.ReadXml(xmlNode as XmlElement); _ndCollection.Add(itemnd); break; case "tag" : tag itemtag = new tag(); itemtag.ReadXml(xmlNode as XmlElement); _tagCollection.Add(itemtag); break; default: break; //throw new ApplicationException(this.GetType().Name + " - Unknown element : " + xmlNode.Name); } } } }
public void Add(nd item) { _list.Add(item); }
public void Remove(nd item) { _list.Remove(item); }