/// <summary>
            ///     Loads the database settings from the specified XML element.
            /// </summary>
            /// <param name="element">The XML element to load from.</param>
            /// <param name="helper">The XML configuration helper being used.</param>
            internal void LoadFromXmlElement(XElement element, ConfigurationFileHelper helper)
            {
                if (element == null)
                {
                    return;
                }

                //Load databases
                helper.ReadElementCollectionTo(
                    element,
                    "database",
                    e =>
                {
                    string name = helper.ReadStringAttribute(
                        e,
                        "name"
                        );

                    string connectionString = helper.ReadStringAttribute(
                        e,
                        "connectionString"
                        );

                    return(new DatabaseConnectionData(
                               name,
                               connectionString
                               ));
                },
                    Databases
                    );
            }
            /// <summary>
            ///     Loads the plugins settings from the specified XML element.
            /// </summary>
            /// <param name="element">The XML element to load from.</param>
            /// <param name="helper">The XML configuration helper being used.</param>
            internal void LoadFromXmlElement(XElement element, ConfigurationFileHelper helper)
            {
                if (element == null)
                {
                    return;
                }

                //LoadByDefault attribute.
                LoadByDefault = helper.ReadBooleanAttribute(
                    element,
                    "loadByDefault",
                    false
                    );

                //Load plugins
                helper.ReadElementCollectionTo(
                    element,
                    "plugin",
                    e =>
                {
                    PluginSettings pluginSettings = new PluginSettings();
                    pluginSettings.LoadFromXmlElement(e, helper);
                    return(pluginSettings);
                },
                    Plugins
                    );
            }
            /// <summary>
            ///     Loads the logging settings from the specified XML element.
            /// </summary>
            /// <param name="element">The XML element to load from.</param>
            /// <param name="helper">The XML configuration helper being used.</param>
            internal void LoadFromXmlElement(XElement element, ConfigurationFileHelper helper)
            {
                if (element == null)
                {
                    return;
                }

                StartupLogLevels = helper.ReadLogLevelsAttributeOrDefault(
                    element,
                    "startupLevels",
                    new LogType[] { LogType.Info, LogType.Warning, LogType.Error, LogType.Fatal }
                    );

                //Load writers
                var logWritersElement = helper.GetRequiredElement(element, "logWriters");

                helper.ReadElementCollectionTo(
                    logWritersElement,
                    "logWriter",
                    e => {
                    LogWriterSettings s = new LogWriterSettings();
                    s.LoadFromXmlElement(e, helper);
                    return(s);
                },
                    LogWriters
                    );
            }
 /// <summary>
 ///     Loads the groups settings from the specified XML element.
 /// </summary>
 /// <param name="element">The XML element to load from.</param>
 /// <param name="helper">The XML configuration helper being used.</param>
 internal void LoadFromXmlElement(XElement element, ConfigurationFileHelper helper)
 {
     helper.ReadElementCollectionTo(
         element,
         "group",
         e => {
         GroupSettings s = new GroupSettings();
         s.LoadFromXmlElement(e, helper);
         return(s);
     },
         Groups
         );
 }
            /// <summary>
            ///     Loads the server settings from the specified XML element.
            /// </summary>
            /// <param name="element">The XML element to load from.</param>
            /// <param name="helper">The XML configuration helper being used.</param>
            internal void LoadFromXmlElement(XElement element, ConfigurationFileHelper helper)
            {
                if (element == null)
                {
                    return;
                }

                //Read search paths
                helper.ReadElementCollectionTo(
                    element,
                    "pluginSearchPath",
                    e =>
                {
                    PluginSearchPath psp = new PluginSearchPath();
                    psp.LoadFromXmlElement(e, helper);
                    return(psp);
                },
                    PluginSearchPaths
                    );
            }
                /// <summary>
                ///     Loads the groups settings from the specified XML element.
                /// </summary>
                /// <param name="element">The XML element to load from.</param>
                /// <param name="helper">The XML configuration helper being used.</param>
                internal void LoadFromXmlElement(XElement element, ConfigurationFileHelper helper)
                {
                    Name = helper.ReadStringAttribute(
                        element,
                        "name"
                        );

                    Visibility = helper.ReadServerVisibilityAttribute(
                        element,
                        "visibility"
                        );

                    helper.ReadElementCollectionTo(
                        element,
                        "connectsTo",
                        e => {
                        ConnectsToSettings s = new ConnectsToSettings();
                        s.LoadFromXmlElement(e, helper);
                        return(s);
                    },
                        ConnectsTo
                        );
                }