Ejemplo n.º 1
0
        public void Write(XmlWriter aWriter)
        {
            aWriter.WriteStartElement("ProjectItem");

            WriteProperties(aWriter);
            ProjectItemExtensions.WriteItems(this, aWriter);

            aWriter.WriteEndElement();
        }
Ejemplo n.º 2
0
        public void Read(XmlReader aReader)
        {
            ReadProperties(aReader);

            while (aReader.Read() && aReader.NodeType != XmlNodeType.EndElement)
            {
                if (aReader.NodeType == XmlNodeType.Element && !aReader.IsEmptyElement)
                {
                    if (aReader.Name == "Items")
                    {
                        ProjectItemExtensions.ReadItems(this, aReader);
                    }
                }
            }
        }
Ejemplo n.º 3
0
        public void Read(XmlReader Reader)
        {
            Code        = Reader.GetAttribute("Code");
            Name        = Reader.GetAttribute("Name");
            Description = Reader.GetAttribute("Description");

            while (Reader.Read() && Reader.NodeType != XmlNodeType.EndElement)
            {
                if (Reader.NodeType == XmlNodeType.Element && !Reader.IsEmptyElement)
                {
                    if (Reader.Name == "ProjectDependencies")
                    {
                        ReadProjectDependencies(Reader);
                    }
                    else if (Reader.Name == "Items")
                    {
                        ProjectItemExtensions.ReadItems(this, Reader);
                    }
                }
            }
        }
Ejemplo n.º 4
0
        public void Write(XmlWriter Writer)
        {
            Writer.WriteStartElement("Project");
            Writer.WriteAttributeString("Code", Code);
            Writer.WriteAttributeString("Name", Name);
            Writer.WriteAttributeString("Description", Description);

            Writer.WriteStartElement("ProjectDependencies");
            for (int i = 0, icount = _ProjectDependencies.Count; i < icount; i++)
            {
                Writer.WriteStartElement("Project");
                Writer.WriteAttributeString("Code", _ProjectDependencies[i].Code);
                Writer.WriteAttributeString("Name", _ProjectDependencies[i].Name);
                Writer.WriteAttributeString("Description", _ProjectDependencies[i].Description);
                Writer.WriteEndElement();
            }
            Writer.WriteEndElement();

            ProjectItemExtensions.WriteItems(this, Writer);

            Writer.WriteEndElement();
        }