Table of Contents

Class SettingsProviderBase

Namespace
Loehnert.Utility.Settings
Assembly
Loehnert.Utility.dll

Represents a base for a SettingsProvider with XML file handling.

public abstract class SettingsProviderBase : SettingsProvider, IApplicationSettingsProvider
Inheritance
SettingsProviderBase
Implements
Derived
Inherited Members
Extension Methods

Properties

ApplicationName

Gets or sets the name for the executing assembly.

public override string ApplicationName { get; set; }

Property Value

string

FilePath

Gets the name for the path.

protected abstract string FilePath { get; }

Property Value

string

Name

Gets the name of the provider.

public override abstract string Name { get; }

Property Value

string

Methods

GetGlobalSettingsNode()

Gets the global settings node.

protected virtual XmlNode GetGlobalSettingsNode()

Returns

XmlNode

Global settings node.

GetLocalSettingsNode()

Gets the local settings node.

protected virtual XmlNode GetLocalSettingsNode()

Returns

XmlNode

Local settings node.

GetPreviousVersion(SettingsContext, SettingsProperty)

Returns the value of the specified settings property for the previous version of the same application.

public SettingsPropertyValue GetPreviousVersion(SettingsContext context, SettingsProperty property)

Parameters

context SettingsContext

A SettingsContext describing the current application usage.

property SettingsProperty

The SettingsProperty whose value is to be returned.

Returns

SettingsPropertyValue

Get the value for th previous version.

GetPropertyValues(SettingsContext, SettingsPropertyCollection)

Returns the collection of settings property values for the specified application instance and settings property group.

public override SettingsPropertyValueCollection GetPropertyValues(SettingsContext context, SettingsPropertyCollection collection)

Parameters

context SettingsContext

A SettingsContext describing the current application use.

collection SettingsPropertyCollection

A System.Configuration.SettingsPropertyCollection containing the settings property group whose values are to be retrieved.

Returns

SettingsPropertyValueCollection

The values for the specified settings property group.

Initialize(string, NameValueCollection)

Initializes the provider.

public override void Initialize(string name, NameValueCollection config)

Parameters

name string

The friendly name of the provider.

config NameValueCollection

A collection of the name/value pairs representing the provider-specific attributes specified in the configuration for this provider.

Reset(SettingsContext)

Resets the local and global settings nodes.

public void Reset(SettingsContext context)

Parameters

context SettingsContext

A SettingsContext describing the current application usage.

SetPropertyValues(SettingsContext, SettingsPropertyValueCollection)

Sets the values of the specified group of property settings.

public override void SetPropertyValues(SettingsContext context, SettingsPropertyValueCollection collection)

Parameters

context SettingsContext

A SettingsContext describing the current application usage.

collection SettingsPropertyValueCollection

A SettingsPropertyValueCollection representing the group of property settings to set.

Upgrade(SettingsContext, SettingsPropertyCollection)

Upgrades the provider.

public void Upgrade(SettingsContext context, SettingsPropertyCollection properties)

Parameters

context SettingsContext

A SettingsContext describing the current application usage.

properties SettingsPropertyCollection

A SettingsPropertyCollection containing the settings property group whose values are to be retrieved.

Remarks

Nothing will be done here.