Nucleus .Net Core CMS

ModuleSettingsExtensions Class

Namespace: Nucleus.Extensions
Assembly: Nucleus.Extensions.dll
Extension methods for Module settings

Methods

Get (List<ModuleSetting>,String,String) Method

Get (List<ModuleSetting> settings, String key, String defaultValue)
Gets the specified value or returns an empty string if the key is not present.
Parameters
Name Type
settings System.Collections.Generic.List<Nucleus.Abstractions.Models.ModuleSetting>
key String
defaultValue String
Returns
string

Get (List<ModuleSetting>,String,Guid) Method

Get (List<ModuleSetting> settings, String key, Guid defaultValue)
Gets the specified value or returns an empty string if the key is not present.
Parameters
Name Type
settings System.Collections.Generic.List<Nucleus.Abstractions.Models.ModuleSetting>
key String
defaultValue Guid
Returns
Guid

Get (List<ModuleSetting>,String,Nullable<DateTime>) Method

Get (List<ModuleSetting> settings, String key, Nullable<DateTime> defaultValue)
Gets the specified value or returns an empty string if the key is not present.
Parameters
Name Type
settings System.Collections.Generic.List<Nucleus.Abstractions.Models.ModuleSetting>
key String
defaultValue System.Nullable<System.DateTime>

Get (List<ModuleSetting>,String,Int32) Method

Get (List<ModuleSetting> settings, String key, Int32 defaultValue)
Gets the specified value or returns an empty string if the key is not present.
Parameters
Name Type
settings System.Collections.Generic.List<Nucleus.Abstractions.Models.ModuleSetting>
key String
defaultValue Int32

Get (List<ModuleSetting>,String,Boolean) Method

Get (List<ModuleSetting> settings, String key, Boolean defaultValue)
Gets the specified value or returns an empty string if the key is not present.
Parameters
Name Type
settings System.Collections.Generic.List<Nucleus.Abstractions.Models.ModuleSetting>
key String
defaultValue Boolean

Get<T> (List<T>) Method

Get<T> (List<T> defaultValue)
Gets the specified value or returns an empty string if the key is not present.
Type Parameters
T Type to return.
Parameters
Name Type
settings System.Collections.Generic.List<Nucleus.Abstractions.Models.ModuleSetting>
key String
defaultValue <T>

Set (List<ModuleSetting>,String,String) Method

Set (List<ModuleSetting> settings, String key, String value)
Adds or replaces the value for the specified key.
Parameters
Name Type
settings System.Collections.Generic.List<Nucleus.Abstractions.Models.ModuleSetting>
key String
value String

Set (List<ModuleSetting>,String,Nullable<Boolean>) Method

Set (List<ModuleSetting> settings, String key, Nullable<Boolean> value)
Adds or replaces the value for the specified key.
Parameters
Name Type
settings System.Collections.Generic.List<Nucleus.Abstractions.Models.ModuleSetting>
key String
value System.Nullable<System.Boolean>

Set (List<ModuleSetting>,String,Nullable<Int32>) Method

Set (List<ModuleSetting> settings, String key, Nullable<Int32> value)
Adds or replaces the value for the specified key.
Parameters
Name Type
settings System.Collections.Generic.List<Nucleus.Abstractions.Models.ModuleSetting>
key String
value System.Nullable<System.Int32>

Set (List<ModuleSetting>,String,Int32) Method

Set (List<ModuleSetting> settings, String key, Int32 value)
Adds or replaces the value for the specified key.
Parameters
Name Type
settings System.Collections.Generic.List<Nucleus.Abstractions.Models.ModuleSetting>
key String
value Int32

Set (List<ModuleSetting>,String,Nullable<Guid>) Method

Set (List<ModuleSetting> settings, String key, Nullable<Guid> value)
Adds or replaces the value for the specified key.
Parameters
Name Type
settings System.Collections.Generic.List<Nucleus.Abstractions.Models.ModuleSetting>
key String
value System.Nullable<System.Guid>

Set (List<ModuleSetting>,String,Nullable<DateTime>) Method

Set (List<ModuleSetting> settings, String key, Nullable<DateTime> value)
Adds or replaces the value for the specified key.
Parameters
Name Type
settings System.Collections.Generic.List<Nucleus.Abstractions.Models.ModuleSetting>
key String
value System.Nullable<System.DateTime>

Set (List<ModuleSetting>,String,Double) Method

Set (List<ModuleSetting> settings, String key, Double value)
Adds or replaces the value for the specified key.
Parameters
Name Type
settings System.Collections.Generic.List<Nucleus.Abstractions.Models.ModuleSetting>
key String
value Double

Set (List<ModuleSetting>,String,Enum) Method

Set (List<ModuleSetting> settings, String key, Enum value)
Adds or replaces the value for the specified key.
Parameters
Name Type
settings System.Collections.Generic.List<Nucleus.Abstractions.Models.ModuleSetting>
key String
value Enum

The value of any enum type.