Table of Contents

Class XmlConfigurationManager

Namespace
Loehnert.Lisrt.Modules.Configuration.Manager
Assembly
Loehnert.Lisrt.Modules.dll

Represents an configuration manger to save and load an IModuleConfiguration from/to XML file.

[Export(typeof(IConfigurationManager))]
public class XmlConfigurationManager : IConfigurationManager
Inheritance
XmlConfigurationManager
Implements
Inherited Members
Extension Methods

Methods

Load()

public IEnumerable<IModuleConfiguration> Load()

Returns

IEnumerable<IModuleConfiguration>

Returns an IModuleConfiguration or null when the dialog was canceled.

Load(string)

Loads the configuration from a file.

public IEnumerable<IModuleConfiguration> Load(string path)

Parameters

path string

Path of the configuration file.

Returns

IEnumerable<IModuleConfiguration>

A configuration.

Exceptions

ArgumentNullException

Thrown when path is null.

ConfigurationFileFormatException

Thrown when the configuration file has not the correct format.

Save(IEnumerable<IModuleConfiguration>)

public void Save(IEnumerable<IModuleConfiguration> configurations)

Parameters

configurations IEnumerable<IModuleConfiguration>

The configuration to be saved.

Save(IEnumerable<IModuleConfiguration>, string)

Saves the configurations to a XML file.

public void Save(IEnumerable<IModuleConfiguration> configurations, string path)

Parameters

configurations IEnumerable<IModuleConfiguration>

Configurations to be saved.

path string

Path of the configuration file.

Events

ConfigurationLoaded

Occurs when a configuration is loaded

public event EventHandler<ConfigurationLoadedEventArgs> ConfigurationLoaded

Event Type

EventHandler<ConfigurationLoadedEventArgs>