Table of Contents

Class SettingsProvider

Namespace
OpenSettings
Assembly
OpenSettings.dll

Provides static methods to retrieve local setting data and registration modes associated with settings. This class allows accessing settings by their type, full name, or other criteria, without needing to instantiate individual setting objects.

public static class SettingsProvider
Inheritance
SettingsProvider
Inherited Members

Methods

GetLocalSettingOrDefault(string)

Retrieves the local setting data associated with the specified setting's full name. If the setting data is found, it is returned; otherwise, null is returned.

public static object GetLocalSettingOrDefault(string settingFullName)

Parameters

settingFullName string

The full name of the setting to retrieve.

Returns

object

The local setting data associated with the setting, or null if no data is found.

Exceptions

ArgumentNullException

Thrown if settingFullName is null or empty.

GetLocalSettingOrDefault(Type)

Retrieves the local setting data associated with the specified Type setting type. If the setting data is found, it is returned; otherwise, null is returned.

public static object GetLocalSettingOrDefault(Type settingType)

Parameters

settingType Type

The type of the setting to retrieve.

Returns

object

The local setting data associated with the setting, or null if no data is found.

Exceptions

ArgumentNullException

Thrown if settingType is null.

GetLocalSettingOrDefault<T>()

Retrieves the local setting data associated with the specified T setting type. If the setting data is found, it is returned; otherwise, null is returned.

public static T GetLocalSettingOrDefault<T>() where T : ISettings

Returns

T

The local setting data associated with the setting, or null if no data is found.

Type Parameters

T

The type of the setting to retrieve. The type must implement ISettings.

Exceptions

ArgumentNullException

Thrown if T is null.

GetRegistrationMode(string)

Retrieves the registration mode associated with the specified setting's full name. If the registration mode is found, it is returned; otherwise, null is returned.

public static RegistrationMode? GetRegistrationMode(string settingFullName)

Parameters

settingFullName string

The full name of the setting to retrieve the registration mode for.

Returns

RegistrationMode?

A nullable RegistrationMode indicating the registration mode of the setting, or null if not found.

Exceptions

ArgumentNullException

Thrown if settingFullName is null or empty.