/// <exception cref="ArgumentNullException"> /// <paramref name="node"/> is null. /// </exception> internal void Serialize(XmlElement node) { if (node == null) throw new ArgumentNullException("node"); node.CreateElement("Id", Id.ToString()); node.CreateElement("Text", Text); OnSerializing(new SerializeEventArgs(node)); }
public void WriteToXml(XmlElement element) { RefreshCurrentAssemblyList(); // TODO: How do we refresh the update the current list before saving if (!string.IsNullOrEmpty(manager.CurrentListName)) element.SetAttribute("current", manager.CurrentListName); foreach (var assemblyListName in manager.AssemblyLists.Keys) { var listElement = element.CreateElement("AssemblyList"); listElement.SetAttribute("name", assemblyListName); foreach (var path in manager.AssemblyLists[assemblyListName]) { listElement.CreateLeafElementWithValue("AssemblyFile", path); } } }
public void Serialize(XmlElement root) { if (root == null) throw new ArgumentNullException("root"); root.CreateElement("Id", Id.ToString()); root.CreateElement("Name", Name); SaveEntitites(root); SaveRelationships(root); OnSerializing(new SerializeEventArgs(root)); }
/// <exception cref="ArgumentNullException"> /// <paramref name="node"/> is null. /// </exception> protected internal override void Serialize(XmlElement node) { base.Serialize(node); node.CreateElement("Direction", Direction.ToString()); node.CreateElement("AssociationType", AssociationType.ToString()); if (StartRole.IsNotEmpty()) node.CreateElement("StartRole", StartRole); if (EndRole.IsNotEmpty()) node.CreateElement("EndRole", EndRole); if (StartMultiplicity.IsNotEmpty()) node.CreateElement("StartMultiplicity", StartMultiplicity); if (EndMultiplicity.IsNotEmpty()) node.CreateElement("EndMultiplicity", EndMultiplicity); }
protected override void Serialize(XmlElement node) { node.CreateElement("Id", Entity.Id.ToString()); XmlElement locationNode = node.OwnerDocument.CreateElement("Location"); locationNode.SetAttribute("left", Left.ToString()); locationNode.SetAttribute("top", Top.ToString()); node.AppendChild(locationNode); XmlElement sizeNode = node.OwnerDocument.CreateElement("Size"); sizeNode.SetAttribute("width", Width.ToString()); sizeNode.SetAttribute("height", Height.ToString()); node.AppendChild(sizeNode); }
/// <exception cref="ArgumentNullException"> /// <paramref name="node"/> is null. /// </exception> protected internal virtual void Serialize(XmlElement node) { if (node == null) throw new ArgumentNullException("node"); if (SupportsLabel && Label != null) node.CreateElement("Label", Label); OnSerializing(new SerializeEventArgs(node)); }
public virtual void Serialize(XmlElement root) { if (root == null) throw new ArgumentNullException("root"); root.CreateElement("Id", Id.ToString()); root.CreateElement("Name", Name); root.CreateElement("Collapsed", Collapsed.ToString()); XmlElement child = root.OwnerDocument.CreateElement("ProjectItems"); foreach (IProjectItem item in items) { XmlElement itemElement = root.OwnerDocument.CreateElement("ProjectItem"); item.Serialize(itemElement); if (item.ItemType == ProjectItemType.Type) itemElement.SetAttribute("type", (item as TypeBase).EntityType.ToString()); else itemElement.SetAttribute("type", item.ItemType.ToString()); child.AppendChild(itemElement); } root.AppendChild(child); OnSerializing(new SerializeEventArgs(root)); }
protected internal override void Serialize(XmlElement node) { base.Serialize(node); node.CreateElement("tableName", tableName); }
protected override void Serialize(XmlElement node) { base.Serialize(node); node.CreateElement("Text", Text); }
protected override void Serialize(XmlElement node) { base.Serialize(node); node.CreateElement("Collapsed", Collapsed.ToString()); }
/// <exception cref="ArgumentNullException"> /// <paramref name="node"/> is null. /// </exception> protected internal override void Serialize(XmlElement node) { base.Serialize(node); node.CreateElement("Modifier", Modifier.ToString()); if(IsSuperClass && baseClass == null) node.CreateElement("InheritanceStrategy", InheritanceStrategy.ToString()); }
/// <exception cref="ArgumentNullException"> /// <paramref name="node"/> is null. /// </exception> protected internal virtual void Serialize(XmlElement node) { if (node == null) throw new ArgumentNullException("node"); node.CreateElement("Id", Id.ToString()); node.CreateElement("Name", Name); node.CreateElement("Access", AccessModifier.ToString()); if(Comments.IsNotEmpty()) node.CreateElement("Comments", Comments); OnSerializing(new SerializeEventArgs(node)); }