Пример #1
0
		/// <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);
                }
            }
        }
Пример #3
0
        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);
		}
Пример #5
0
        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);
        }
Пример #6
0
		/// <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));
		}
Пример #7
0
        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);
 }
Пример #9
0
        protected override void Serialize(XmlElement node)
        {
            base.Serialize(node);

            node.CreateElement("Text", Text);
        }
Пример #10
0
        protected override void Serialize(XmlElement node)
        {
            base.Serialize(node);

            node.CreateElement("Collapsed", Collapsed.ToString());
        }
Пример #11
0
		/// <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());
		}
Пример #12
0
        /// <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));
        }