/// <summary> /// Loads the log writer 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; } Type = helper.ReadStringAttribute( element, "type" ); Name = helper.ReadStringAttribute( element, "name" ); LogLevels = helper.ReadLogLevelsAttribute( element, "levels" ); helper.ReadAttributeCollectionTo( element.Element("settings"), Settings ); }
/// <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 plugin 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; } //Type attribute. Type = helper.ReadStringAttribute( element, "type" ); //Load attribute. Load = helper.ReadBooleanAttribute( element, "load", true ); helper.ReadAttributeCollectionTo( element.Element("settings"), Settings ); }
/// <summary> /// Loads the path 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 source Source = helper.ReadStringAttribute( element, "src" ); //Read port CreateDirectory = helper.ReadBooleanAttribute( element, "createDir", false ); // Read dependency resolution strategy DependencyResolutionStrategy = helper.ReadDependencyResolutionStrategy( element, "dependencyResolutionStrategy", DependencyResolutionStrategy.RecursiveFromFile ); }
/// <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" ); }
/// <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 data directory Directory = helper.ReadStringAttribute( element, "directory" ); }
/// <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 ); }