/// <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
        }
        /// <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
        }
示例#3
0
 public BibliographyContent(BibliographyContent source)
     : base(source)
 {
     _isLoaded    = source._isLoaded;
     _dicItems    = source._dicItems;
     _contentFile = source._contentFile;
 }
示例#4
0
        protected override bool OnCreateTopic(string ddueXmlDir,
                                              string ddueCompDir, string ddueHtmlDir)
        {
            if (!Directory.Exists(ddueHtmlDir))
            {
                Directory.CreateDirectory(ddueHtmlDir);
            }

            BuildFilePath filePath = this.FilePath;

            if (filePath == null || !filePath.Exists)
            {
                return(false);
            }

            string topicId = this.TopicId;

            if (String.IsNullOrEmpty(topicId))
            {
                return(false);
            }

            string documentPath = Path.Combine(ddueHtmlDir, topicId + ".htm");

            if (File.Exists(documentPath))
            {
                File.SetAttributes(documentPath, FileAttributes.Normal);
                File.Delete(documentPath);
            }

            File.Copy(filePath, documentPath, true);
            File.SetAttributes(documentPath, FileAttributes.Normal);

            return(true);
        }
示例#5
0
 protected ConceptualItem(BuildFilePath filePath, string topicTitle,
                          string topicId) : this()
 {
     _filePath   = filePath;
     _topicTitle = topicTitle;
     _topicId    = topicId;
 }
示例#6
0
        public TokenContent(string contentFile)
            : this()
        {
            BuildExceptions.PathMustExist(contentFile, "contentFile");

            _contentFile = new BuildFilePath(contentFile);
        }
示例#7
0
 public TokenContent(TokenContent source)
     : base(source)
 {
     _isLoaded    = source._isLoaded;
     _contentFile = source._contentFile;
     _dicItems    = source._dicItems;
 }
示例#8
0
 public SharedContent(SharedContent source)
     : base(source)
 {
     _contentName = source._contentName;
     _contentFile = source._contentFile;
     _dicItems    = source._dicItems;
 }
示例#9
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
        }
示例#10
0
        public FormatHxs(FormatHxs source)
            : base(source)
        {
            _keepSources      = source._keepSources;
            _separateIndex    = source._separateIndex;
            _includeStopWords = source._includeStopWords;
            _compilerFile     = source._compilerFile;
            _compilerDir      = source._compilerDir;

            _helpTitleId = source._helpTitleId;

            // Plugin properties...
            _pluginTocFlat  = source._pluginTocFlat;
            _pluginTitle    = source._pluginTitle;
            _pluginParents  = source._pluginParents;
            _pluginChildren = source._pluginChildren;

            // Named Url Properties...
            _homePage       = source._homePage;
            _defaultPage    = source._defaultPage;
            _navFailPage    = source._navFailPage;
            _aboutPageInfo  = source._aboutPageInfo;
            _aboutPageIcon  = source._aboutPageIcon;
            _filterEditPage = source._filterEditPage;
            _helpPage       = source._helpPage;
            _supportPage    = source._supportPage;
            _sampleDirPage  = source._sampleDirPage;
            _searchHelpPage = source._searchHelpPage;
        }
示例#11
0
        /// <summary>
        /// This reads and sets its state or attributes stored in a <c>XML</c> format
        /// with the given reader.
        /// </summary>
        /// <param name="reader">
        /// The reader with which the <c>XML</c> attributes of this object are accessed.
        /// </param>
        /// <exception cref="ArgumentNullException">
        /// If the <paramref name="reader"/> is <see langword="null"/>.
        /// </exception>
        public override void ReadXml(XmlReader reader)
        {
            BuildExceptions.NotNull(reader, "reader");

            Debug.Assert(reader.NodeType == XmlNodeType.Element);
            if (reader.NodeType != XmlNodeType.Element)
            {
                return;
            }

            if (!String.Equals(reader.Name, TagName,
                               StringComparison.OrdinalIgnoreCase))
            {
                Debug.Assert(false, String.Format(
                                 "The element name '{0}' does not match the expected '{1}'.",
                                 reader.Name, TagName));
                return;
            }

            if (reader.IsEmptyElement)
            {
                return;
            }

            while (reader.Read())
            {
                if (reader.NodeType == XmlNodeType.Element)
                {
                    if (String.Equals(reader.Name, "propertyGroup",
                                      StringComparison.OrdinalIgnoreCase))
                    {
                        this.ReadPropertyGroup(reader);
                    }
                    else if (String.Equals(reader.Name, "location",
                                           StringComparison.OrdinalIgnoreCase))
                    {
                        _sourcePath = BuildFilePath.ReadLocation(reader);
                    }
                    else if (String.Equals(reader.Name, "contents",
                                           StringComparison.OrdinalIgnoreCase))
                    {
                        this.ReadContents(reader);
                    }
                    else if (String.Equals(reader.Name, "filters",
                                           StringComparison.OrdinalIgnoreCase))
                    {
                        this.ReadFilters(reader);
                    }
                }
                else if (reader.NodeType == XmlNodeType.EndElement)
                {
                    if (String.Equals(reader.Name, TagName,
                                      StringComparison.OrdinalIgnoreCase))
                    {
                        break;
                    }
                }
            }
        }
示例#12
0
 public ReferenceItem(ReferenceItem source)
     : base(source)
 {
     _comments   = source._comments;
     _assembly   = source._assembly;
     _source     = source._source;
     _xamlSyntax = source._xamlSyntax;
 }
示例#13
0
        public void Load(string contentFile)
        {
            BuildExceptions.PathMustExist(contentFile, "contentFile");

            _contentFile = new BuildFilePath(contentFile);

            this.Load();
        }
示例#14
0
        public ScriptItem(string name, BuildFilePath scriptFile)
        {
            BuildExceptions.NotNullNotEmpty(name, "name");

            _name       = name;
            _condition  = String.Empty;
            _scriptFile = scriptFile;
        }
示例#15
0
        public void Save(string contentFile)
        {
            BuildExceptions.NotNullNotEmpty(contentFile, "contentFile");

            _contentFile = new BuildFilePath(contentFile);

            this.Save();
        }
示例#16
0
 public BibliographyContent(string contentsFile)
     : this()
 {
     if (!String.IsNullOrEmpty(contentsFile))
     {
         _contentFile = new BuildFilePath(contentsFile);
     }
 }
示例#17
0
 public CommentContent(CommentContent source)
     : base(source)
 {
     _dicItems     = source._dicItems;
     _isLoaded     = source._isLoaded;
     _contentFile  = source._contentFile;
     _assemblyName = source._assemblyName;
 }
示例#18
0
        public StyleSheetItem(string name, BuildFilePath styleFile)
        {
            BuildExceptions.NotNullNotEmpty(name, "name");

            _name      = name;
            _condition = String.Empty;
            _styleFile = styleFile;
        }
示例#19
0
        public XslTransformItem(string name, BuildFilePath transformFile)
        {
            BuildExceptions.NotNullNotEmpty(name, "name");

            _tag           = String.Empty;
            _name          = name;
            _transformFile = transformFile;
        }
示例#20
0
 public ReferenceVsNetItem(ReferenceVsNetItem source)
     : base(source)
 {
     _isEnabled  = source._isEnabled;
     _xamlSyntax = source._xamlSyntax;
     _sourcePath = source._sourcePath;
     _includeSet = source._includeSet;
 }
示例#21
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ReferenceImportSource"/> class
 /// with parameters copied from the specified instance of the
 /// <see cref="ReferenceImportSource"/> class, a copy constructor.
 /// </summary>
 /// <param name="source">
 /// An instance of the <see cref="ReferenceImportSource"/> class from which the
 /// initialization parameters or values will be copied.
 /// </param>
 /// <exception cref="ArgumentNullException">
 /// If the parameter <paramref name="source"/> is <see langword="null"/>.
 /// </exception>
 public ReferenceImportSource(ReferenceImportSource source)
     : base(source)
 {
     _sourcePath              = source._sourcePath;
     _overrideFilters         = source._overrideFilters;
     _overrideComments        = source._overrideComments;
     _overrideHierarchicalToc = source._overrideHierarchicalToc;
 }
示例#22
0
 public XslTransformItem(XslTransformItem source)
     : base(source)
 {
     _tag           = source._tag;
     _name          = source._name;
     _description   = source._description;
     _transformFile = source._transformFile;
 }
示例#23
0
        /// <summary>
        /// This reads and sets its state or attributes stored in a <c>XML</c> format
        /// with the given reader.
        /// </summary>
        /// <param name="reader">
        /// The reader with which the <c>XML</c> attributes of this object are accessed.
        /// </param>
        /// <exception cref="ArgumentNullException">
        /// If the <paramref name="reader"/> is <see langword="null"/>.
        /// </exception>
        public override void ReadXml(XmlReader reader)
        {
            BuildExceptions.NotNull(reader, "reader");

            Debug.Assert(reader.NodeType == XmlNodeType.Element);
            if (reader.NodeType != XmlNodeType.Element)
            {
                return;
            }

            if (!String.Equals(reader.Name, TagName,
                               StringComparison.OrdinalIgnoreCase))
            {
                Debug.Assert(false, String.Format(
                                 "The element name '{0}' does not match the expected '{1}'.",
                                 reader.Name, TagName));
                return;
            }

            string nodeText = reader.GetAttribute("xamlSyntax");

            if (!String.IsNullOrEmpty(nodeText))
            {
                _xamlSyntax = Convert.ToBoolean(nodeText);
            }

            while (reader.Read())
            {
                if (reader.NodeType == XmlNodeType.Element)
                {
                    if (String.Equals(reader.Name, "assembly",
                                      StringComparison.OrdinalIgnoreCase) && !reader.IsEmptyElement)
                    {
                        _assembly = BuildFilePath.ReadLocation(reader);
                    }
                    else if (String.Equals(reader.Name, "comments",
                                           StringComparison.OrdinalIgnoreCase) && !reader.IsEmptyElement)
                    {
                        _comments = BuildFilePath.ReadLocation(reader);
                    }
                    else if (String.Equals(reader.Name, "source",
                                           StringComparison.OrdinalIgnoreCase) && !reader.IsEmptyElement)
                    {
                        _source = BuildFilePath.ReadLocation(reader);
                    }
                }
                else if (reader.NodeType == XmlNodeType.EndElement)
                {
                    if (String.Equals(reader.Name, TagName,
                                      StringComparison.OrdinalIgnoreCase))
                    {
                        break;
                    }
                }
            }
        }
示例#24
0
 public ScriptItem(ScriptItem source)
     : base(source)
 {
     _tag         = source._tag;
     _name        = source._name;
     _condition   = source._condition;
     _scriptFile  = source._scriptFile;
     _description = source._description;
     _overrides   = source._overrides;
 }
示例#25
0
        /// <summary>
        /// This reads and sets its state or attributes stored in a <c>XML</c> format
        /// with the given reader.
        /// </summary>
        /// <param name="reader">
        /// The reader with which the <c>XML</c> attributes of this object are accessed.
        /// </param>
        /// <exception cref="ArgumentNullException">
        /// If the <paramref name="reader"/> is <see langword="null"/>.
        /// </exception>
        public override void ReadXml(XmlReader reader)
        {
            BuildExceptions.NotNull(reader, "reader");

            Debug.Assert(reader.NodeType == XmlNodeType.Element);
            if (reader.NodeType != XmlNodeType.Element)
            {
                return;
            }

            if (!String.Equals(reader.Name, TagName,
                               StringComparison.OrdinalIgnoreCase))
            {
                Debug.Assert(false, String.Format(
                                 "The element name '{0}' does not match the expected '{1}'.",
                                 reader.Name, TagName));
                return;
            }

            _name = reader.GetAttribute("name");

            if (reader.IsEmptyElement)
            {
                return;
            }

            while (reader.Read())
            {
                if (reader.NodeType == XmlNodeType.Element)
                {
                    switch (reader.Name.ToLower())
                    {
                    case "description":
                        _description = reader.ReadString();
                        break;

                    case "tag":
                        _tag = reader.ReadString();
                        break;

                    case "transformFile":
                        _transformFile = BuildFilePath.ReadLocation(reader);
                        break;
                    }
                }
                else if (reader.NodeType == XmlNodeType.EndElement)
                {
                    if (String.Equals(reader.Name, TagName,
                                      StringComparison.OrdinalIgnoreCase))
                    {
                        break;
                    }
                }
            }
        }
示例#26
0
        public XslTransformItem(string name, string transformFile)
        {
            BuildExceptions.NotNullNotEmpty(name, "name");

            _tag  = String.Empty;
            _name = name;
            if (!String.IsNullOrEmpty(transformFile))
            {
                _transformFile = new BuildFilePath(transformFile);
            }
        }
示例#27
0
 public DependencyItem(DependencyItem source)
     : base(source)
 {
     _name                   = source._name;
     _path                   = source._path;
     _strongName             = source._strongName;
     _isRedirected           = source._isRedirected;
     _redirectPublicKeyToken = source._redirectPublicKeyToken;
     _redirectVersion        = source._redirectVersion;
     _redirectCulture        = source._redirectCulture;
 }
示例#28
0
 public ReferenceItem(string comments, string assembly)
 {
     if (!String.IsNullOrEmpty(comments))
     {
         _comments = new BuildFilePath(comments);
     }
     if (!String.IsNullOrEmpty(assembly))
     {
         _assembly = new BuildFilePath(assembly);
     }
 }
示例#29
0
        public ScriptItem(string name, string scriptFile)
        {
            BuildExceptions.NotNullNotEmpty(name, "name");

            _name      = name;
            _condition = String.Empty;
            if (!String.IsNullOrEmpty(scriptFile))
            {
                _scriptFile = new BuildFilePath(scriptFile);
            }
        }
示例#30
0
 public DependencyItem(BuildFilePath path)
     : this()
 {
     if (path != null)
     {
         _path = path;
         if (_path.IsValid)
         {
             _name = _path.Name;
         }
     }
 }