/// <summary>
        /// This writes the current state or attributes of this object,
        /// in the <c>XML</c> format, to the media or storage accessible by the given writer.
        /// </summary>
        /// <param name="writer">
        /// The <c>XML</c> writer with which the <c>XML</c> format of this object's state
        /// is written.
        /// </param>
        /// <exception cref="ArgumentNullException">
        /// If the <paramref name="reader"/> is <see langword="null"/>.
        /// </exception>
        public override void WriteXml(XmlWriter writer)
        {
            BuildExceptions.NotNull(writer, "writer");

            if (!this.IsValid)
            {
                return;
            }

            writer.WriteStartElement(TagName);  // start - TagName
            writer.WriteAttributeString("name", this.Name);

            writer.WriteStartElement("propertyGroup");  // start - propertyGroup
            writer.WriteAttributeString("name", "General");
            writer.WritePropertyElement("Id", this.Id);
            writer.WritePropertyElement("Title", this.Title);
            writer.WritePropertyElement("Enabled", this.Enabled);
            writer.WritePropertyElement("IncludesSettings", this.IncludesSettings);
            writer.WritePropertyElement("IncludesConceptuals", this.IncludesConceptuals);
            writer.WritePropertyElement("IncludesReferences", this.IncludesReferences);
            writer.WriteEndElement();                   // end - propertyGroup

            writer.WriteStartElement("importSources");  // start - importSources
            if (_listImports != null && _listImports.Count != 0)
            {
                for (int i = 0; i < _listImports.Count; i++)
                {
                    BuildFilePath.WriteLocation(_listImports[i],
                                                "importSource", writer);
                }
            }
            writer.WriteEndElement();           // end - importSources

            writer.WriteEndElement();           // end - TagName
        }
Example #2
0
        protected override void OnWriteXml(XmlWriter writer)
        {
            BuildFilePath.WriteLocation(_compilerFile,
                                        "compilerFile", writer);
            BuildDirectoryPath.WriteLocation(_compilerDir,
                                             "compilerDirectory", writer);

            writer.WriteStartElement("plugin");  // start - plugin
            writer.WriteAttributeString("flatToc", _pluginTocFlat.ToString());
            writer.WriteTextElement("title", _pluginTitle);
            writer.WriteStartElement("parents"); // start - parents
            if (_pluginParents != null && _pluginParents.Count != 0)
            {
                for (int i = 0; i < _pluginParents.Count; i++)
                {
                    writer.WriteTextElement("parent", _pluginParents[i]);
                }
            }
            writer.WriteEndElement();             // end - parents

            writer.WriteStartElement("children"); // start - children
            if (_pluginChildren != null && _pluginChildren.Count != 0)
            {
                for (int i = 0; i < _pluginChildren.Count; i++)
                {
                    writer.WriteTextElement("child", _pluginChildren[i]);
                }
            }
            writer.WriteEndElement();            // end - children

            writer.WriteEndElement();            // end - plugin
        }
        /// <summary>
        /// This writes the current state or attributes of this object,
        /// in the <c>XML</c> format, to the media or storage accessible by the given writer.
        /// </summary>
        /// <param name="writer">
        /// The <c>XML</c> writer with which the <c>XML</c> format of this object's state
        /// is written.
        /// </param>
        /// <exception cref="ArgumentNullException">
        /// If the <paramref name="reader"/> is <see langword="null"/>.
        /// </exception>
        public override void WriteXml(XmlWriter writer)
        {
            BuildExceptions.NotNull(writer, "writer");

            if (this.IsEmpty)
            {
                return;
            }

            writer.WriteStartElement(TagName);  // start - item
            writer.WriteAttributeString("enabled", _isEnabled.ToString());
            writer.WriteAttributeString("xamlSyntax", _xamlSyntax.ToString());

            BuildFilePath.WriteLocation(_sourcePath, "location", writer);

            writer.WriteStartElement("includes");  // start - includes
            if (_includeSet != null && _includeSet.Count != 0)
            {
                foreach (string include in _includeSet)
                {
                    writer.WriteStartElement("include"); // start - include
                    writer.WriteAttributeString("name", include);
                    writer.WriteEndElement();            // end - include
                }
            }
            writer.WriteEndElement();           // end - includes

            writer.WriteEndElement();           // end - item
        }
Example #4
0
        /// <summary>
        /// This writes the current state or attributes of this object,
        /// in the <c>XML</c> format, to the media or storage accessible by the given writer.
        /// </summary>
        /// <param name="writer">
        /// The <c>XML</c> writer with which the <c>XML</c> format of this object's state
        /// is written.
        /// </param>
        /// <exception cref="ArgumentNullException">
        /// If the <paramref name="reader"/> is <see langword="null"/>.
        /// </exception>
        public override void WriteXml(XmlWriter writer)
        {
            BuildExceptions.NotNull(writer, "writer");

            if (this.IsEmpty)
            {
                return;
            }

            writer.WriteStartElement(TagName);  // start - TagName
            writer.WriteAttributeString("name", _name);
            writer.WriteTextElement("description", _description);
            writer.WriteTextElement("tag", _tag);

            BuildFilePath.WriteLocation(_transformFile,
                                        "transformFile", writer);

            writer.WriteEndElement();           // end - TagName
        }
Example #5
0
 protected override void OnWriteXml(XmlWriter writer)
 {
     BuildFilePath.WriteLocation(_compilerFile,
                                 "compilerFile", writer);
 }