/// <overloads>
        /// Initializes a new instance of the <see cref="BuildEngineSettings"/> class.
        /// </overloads>
        /// <summary>
        /// Initializes a new instance of the <see cref="BuildEngineSettings"/> class
        /// with the default parameters.
        /// </summary>
        /// <param name="name">
        /// The name uniquely identifying this engine settings.
        /// </param>
        /// <param name="engineType">
        /// The engine type implementing this settings.
        /// </param>
        protected BuildEngineSettings(string name, BuildEngineType engineType)
        {
            BuildExceptions.NotNullNotEmpty(name, "name");

            _engineName     = name;
            _engineType     = engineType;
            _properties     = new BuildProperties();
            _sharedContent  = new SharedContent(_engineType.ToString());
            _includeContent = new IncludeContent(_engineType.ToString());

            _configurations                = new BuildConfigurationList(_engineType);
            _pluginConfigurations          = new BuildConfigurationList(_engineType);
            _componentConfigurations       = new BuildComponentConfigurationList(_engineType);
            _pluginComponentConfigurations = new BuildComponentConfigurationList(_engineType);
        }
        /// <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");

            writer.WriteStartElement(TagName);  // start - TagName
            writer.WriteAttributeString("type", _engineType.ToString());
            writer.WriteAttributeString("name", _engineName);

            // 1. Write the general properties...
            this.OnWriteXml(writer);

            // 2. Write the user properties...
            if (_properties != null)
            {
                _properties.WriteXml(writer);
            }

            // 3. Write the configuration contents...
            writer.WriteStartElement("contents");  // start - contents
            if (_sharedContent != null)
            {
                writer.WriteStartElement("content");
                writer.WriteAttributeString("type", "Shared");
                _sharedContent.WriteXml(writer);
                writer.WriteEndElement();
            }
            if (_includeContent != null)
            {
                writer.WriteStartElement("content");
                writer.WriteAttributeString("type", "Include");
                _includeContent.WriteXml(writer);
                writer.WriteEndElement();
            }
            writer.WriteEndElement();              // end - contents

            // 4. Write the default/system plugin configurations...
            writer.WriteComment(" Options for the default configurations ");
            writer.WriteStartElement("configurations"); // start - configurations
            writer.WriteAttributeString("type", "System");
            if (_configurations != null && _configurations.Count != 0)
            {
                for (int i = 0; i < _configurations.Count; i++)
                {
                    _configurations[i].WriteXml(writer);
                }
            }
            writer.WriteEndElement();                   // end - configurations

            writer.WriteComment(" Options for the plugin configurations ");
            writer.WriteStartElement("configurations"); // start - configurations
            writer.WriteAttributeString("type", "Plugin");
            if (_pluginConfigurations != null && _pluginConfigurations.Count != 0)
            {
                for (int i = 0; i < _pluginConfigurations.Count; i++)
                {
                    _pluginConfigurations[i].WriteXml(writer);
                }
            }
            writer.WriteEndElement();                   // end - configurations

            // 5.  Write the default/system component configurations...
            writer.WriteComment(" Options for the default component configurations ");
            writer.WriteStartElement("componentConfigurations"); // start - componentConfigurations
            writer.WriteAttributeString("type", "System");
            if (_componentConfigurations != null && _componentConfigurations.Count != 0)
            {
                for (int i = 0; i < _componentConfigurations.Count; i++)
                {
                    _componentConfigurations[i].WriteXml(writer);
                }
            }
            writer.WriteEndElement();                            // end - componentConfigurations

            writer.WriteComment(" Options for the plugin component configurations ");
            writer.WriteStartElement("componentConfigurations"); // start - componentConfigurations
            writer.WriteAttributeString("type", "Plugin");
            if (_pluginComponentConfigurations != null && _pluginComponentConfigurations.Count != 0)
            {
                for (int i = 0; i < _pluginComponentConfigurations.Count; i++)
                {
                    _pluginComponentConfigurations[i].WriteXml(writer);
                }
            }
            writer.WriteEndElement();                   // end - componentConfigurations

            writer.WriteEndElement();                   // end - TagName
        }