Class XmlConfigurationManager
Represents an configuration manger to save and load an IModuleConfiguration from/to XML file.
Implements
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
Namespace: Loehnert.Lisrt.Modules.Configuration.Manager
Assembly: Loehnert.Lisrt.Modules.dll
Syntax
[Export(typeof(IConfigurationManager))]
public class XmlConfigurationManager : IConfigurationManager
Methods
Load()
Loads a IModuleConfiguration.
Declaration
public IEnumerable<IModuleConfiguration> Load()
Returns
Type | Description |
---|---|
IEnumerable<IModuleConfiguration> | Returns an IModuleConfiguration or null when the dialog was canceled. |
Load(String)
Loads the configuration from a file.
Declaration
public IEnumerable<IModuleConfiguration> Load(string path)
Parameters
Type | Name | Description |
---|---|---|
String | path | Path of the configuration file. |
Returns
Type | Description |
---|---|
IEnumerable<IModuleConfiguration> | A configuration. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | Thrown when |
ConfigurationFileFormatException | Thrown when the configuration file has not the correct format. |
Save(IEnumerable<IModuleConfiguration>)
Saves the IModuleConfiguration.
Declaration
public void Save(IEnumerable<IModuleConfiguration> configurations)
Parameters
Type | Name | Description |
---|---|---|
IEnumerable<IModuleConfiguration> | configurations | The configuration to be saved. |
Save(IEnumerable<IModuleConfiguration>, String)
Saves the configurations to a XML file.
Declaration
public void Save(IEnumerable<IModuleConfiguration> configurations, string path)
Parameters
Type | Name | Description |
---|---|---|
IEnumerable<IModuleConfiguration> | configurations | Configurations to be saved. |
String | path | Path of the configuration file. |
Events
ConfigurationLoaded
Occurs when a configuration is loaded
Declaration
public event EventHandler<ConfigurationLoadedEventArgs> ConfigurationLoaded
Event Type
Type | Description |
---|---|
System.EventHandler<ConfigurationLoadedEventArgs> |