Table of Contents

Class SettingsExtensions

Namespace
OpenSettings.Extensions
Assembly
OpenSettings.dll

Provides extension methods for ISettings.

public static class SettingsExtensions
Inheritance
SettingsExtensions
Inherited Members

Methods

GetLocalSettingOrDefault(ISettings)

Gets the local setting data associated with the specified ISettings object. If local setting data is found, it is returned; otherwise, null is returned.

public static object GetLocalSettingOrDefault(this ISettings setting)

Parameters

setting ISettings

The settings object for which the local setting data is to be retrieved.

Returns

object

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

Exceptions

NullReferenceException

Thrown if null.

GetLocalSettingOrDefault<T>(ISettings)

Gets the local setting data associated with the specified ISettings object, cast to the specified type T. If local setting data is found, it is returned; otherwise, null is returned.

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

Parameters

setting ISettings

The settings object for which the local setting data is to be retrieved.

Returns

T

The local setting data associated with the setting object, cast to type T, or null if no data is found.

Type Parameters

T

The type to which the local setting data should be cast. The type must implement ISettings.

Exceptions

NullReferenceException

Thrown if null.

GetRegistrationMode(ISettings)

Gets the registration mode associated with the specified ISettings object. If the registration mode is found, it is returned; otherwise, null is returned.

public static RegistrationMode? GetRegistrationMode(this ISettings setting)

Parameters

setting ISettings

The settings object for which the registration mode is to be retrieved.

Returns

RegistrationMode?

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

Exceptions

NullReferenceException

Thrown if null.