SettingService.Get Method

Namespace:
Weavy.Core.Services
Assembly:
Weavy.Core.dll

Overloads

Get(string, object) Gets a setting value from the repository.
Get(string, T) Gets a setting value from the repository.
Get() Get settings from the repository.

Get(string, object)

Gets a setting value from the repository.

public static object Get(string key, object defaultValue = null)

Parameters

key
string

Setting key.

defaultValue
object

The default value to return if the setting does not exist.

Returns

object

Returns the value of the setting.

Get(string, T)

Gets a setting value from the repository.

public static T Get<T>(string key, T defaultValue = null)

Parameters

key
string

Setting key.

defaultValue

The default value to return if the setting does not exist.

Returns

Returns the value of the setting.

Get()

Get settings from the repository.

public static TSettings Get<TSettings>()

    where TSettings : class, ISettings

Returns

Returns an object implementing the ISettings interface.