Ejemplo n.º 1
0
        /// <summary>
        /// Loads files specified in file lists.
        /// </summary>
        /// <param name="documentRoot">The root node of the settings document.</param>
        /// <param name="settings">Stores the settings.</param>
        private static void LoadFileLists(XmlNode documentRoot, Settings settings)
        {
            Param.AssertNotNull(documentRoot, "documentRoot");
            Param.AssertNotNull(settings, "settings");

            XmlNodeList fileListNodes = documentRoot.SelectNodes("SourceFileList");

            foreach (XmlNode fileListNode in fileListNodes)
            {
                XmlNodeList fileNodes = fileListNode.SelectNodes("SourceFile");
                if (fileNodes.Count > 0)
                {
                    Settings settingsForFileList = new Settings(settings.Core);

                    XmlNode settingsNode = fileListNode.SelectSingleNode("Settings");
                    if (settingsNode != null)
                    {
                        V43Settings.Load(settingsNode, settingsForFileList);
                    }

                    SourceFileListSettings sourceFileListSettings = new SourceFileListSettings(settingsForFileList);

                    foreach (XmlNode fileNode in fileNodes)
                    {
                        if (!string.IsNullOrEmpty(fileNode.InnerText))
                        {
                            sourceFileListSettings.AddFile(fileNode.InnerText);
                        }
                    }

                    settings.AddSourceFileList(sourceFileListSettings);
                }
            }
        }
Ejemplo n.º 2
0
 /// <summary>
 /// Adds a set of custom source file settings.
 /// </summary>
 /// <param name="sourceFileList">
 /// The source file list settings.
 /// </param>
 internal void AddSourceFileList(SourceFileListSettings sourceFileList)
 {
     Param.AssertNotNull(sourceFileList, "sourceFileList");
     this.sourceFileLists.Add(sourceFileList);
 }
Ejemplo n.º 3
0
        /// <summary>
        /// Loads files specified in file lists.
        /// </summary>
        /// <param name="documentRoot">
        /// The root node of the settings document.
        /// </param>
        /// <param name="settings">
        /// Stores the settings.
        /// </param>
        private static void LoadFileLists(XmlNode documentRoot, Settings settings)
        {
            Param.AssertNotNull(documentRoot, "documentRoot");
            Param.AssertNotNull(settings, "settings");

            XmlNodeList fileListNodes = documentRoot.SelectNodes("SourceFileList");
            foreach (XmlNode fileListNode in fileListNodes)
            {
                XmlNodeList fileNodes = fileListNode.SelectNodes("SourceFile");
                if (fileNodes.Count > 0)
                {
                    Settings settingsForFileList = new Settings(settings.Core);

                    XmlNode settingsNode = fileListNode.SelectSingleNode("Settings");
                    if (settingsNode != null)
                    {
                        V104Settings.Load(settingsNode, settingsForFileList);
                    }

                    SourceFileListSettings sourceFileListSettings = new SourceFileListSettings(settingsForFileList);

                    foreach (XmlNode fileNode in fileNodes)
                    {
                        if (!string.IsNullOrEmpty(fileNode.InnerText))
                        {
                            sourceFileListSettings.AddFile(fileNode.InnerText);
                        }
                    }

                    settings.AddSourceFileList(sourceFileListSettings);
                }
            }
        }
 /// <summary>
 /// Adds a set of custom source file settings.
 /// </summary>
 /// <param name="sourceFileList">
 /// The source file list settings. 
 /// </param>
 internal void AddSourceFileList(SourceFileListSettings sourceFileList)
 {
     Param.AssertNotNull(sourceFileList, "sourceFileList");
     this.sourceFileLists.Add(sourceFileList);
 }