Table of Contents

Class SettingPresetService

Namespace
Dynamicweb.SettingPresets
Assembly
Dynamicweb.Core.dll

The SettingPresetService class providing methods for querying and saving the SettingPreset Aggregate to and from persistence.

public class SettingPresetService : ICacheStorage<int, SettingPreset>, ICacheStorage<int>, ICacheStorage
Inheritance
SettingPresetService
Implements
Inherited Members

Methods

ClearCache()

Resets all keys to the default value for objects stored in the object cache

public void ClearCache()

ClearCache(IEnumerable<int>)

Resets the specified keys to the default value for objects stored in the object cache

public void ClearCache(IEnumerable<int> keys)

Parameters

keys IEnumerable<int>

Keys to reset

ClearCache(int)

Resets the specified key to the default value for objects stored in the object cache

public void ClearCache(int key)

Parameters

key int

Key to reset

Delete(List<int>)

Deletes the SettingPreset, its values and relations.

public void Delete(List<int> SettingPresetIds)

Parameters

SettingPresetIds List<int>

The SettingPreset identifiers.

Delete(int)

Deletes the SettingPreset, its values and relations.

public void Delete(int SettingPresetId)

Parameters

SettingPresetId int

The SettingPreset ID.

GetAll()

Gets all Setting presets

public IEnumerable<SettingPreset> GetAll()

Returns

IEnumerable<SettingPreset>

The collection of the SettingPreset

GetByGroupIds(IEnumerable<int>)

Get all the presets which is assigned to eiher of the given user groups

public IEnumerable<SettingPreset> GetByGroupIds(IEnumerable<int> groupIds)

Parameters

groupIds IEnumerable<int>

A list of user group ids

Returns

IEnumerable<SettingPreset>

The collection of the SettingPreset.

GetById(int)

Gets the Setting preset matching the given id

public SettingPreset? GetById(int id)

Parameters

id int

The id for the setting preset to find

Returns

SettingPreset

SettingPresetValue

GetByTarget(string)

Gets current user Setting presets for specific Target.

public IEnumerable<SettingPreset> GetByTarget(string target)

Parameters

target string

The preset target.

Returns

IEnumerable<SettingPreset>

The collection of the SettingPreset.

GetByTarget(string, int)

Gets the user Setting presets for specific Target.

public IEnumerable<SettingPreset> GetByTarget(string target, int userId)

Parameters

target string

The preset target.

userId int

The user ID.

Returns

IEnumerable<SettingPreset>

The collection of the SettingPreset.

GetByUserId(int)

Get all the presets which is assigned directly to the given userId

public IEnumerable<SettingPreset> GetByUserId(int userId)

Parameters

userId int

The user ID.

Returns

IEnumerable<SettingPreset>

The collection of the SettingPreset.

GetCache(IEnumerable<int>)

public IEnumerable<SettingPreset> GetCache(IEnumerable<int> keys)

Parameters

keys IEnumerable<int>

Returns

IEnumerable<SettingPreset>

GetCache(int)

public SettingPreset? GetCache(int key)

Parameters

key int

Returns

SettingPreset

GetValues(int)

Gets the Setting preset values.

public Dictionary<string, SettingPresetValue>? GetValues(int presetId)

Parameters

presetId int

The preset ID.

Returns

Dictionary<string, SettingPresetValue>

The dictionary of the SettingPresetValue with Key as key.

Save(SettingPreset)

Saves the SettingPreset.

public void Save(SettingPreset settingPreset)

Parameters

settingPreset SettingPreset

The SettingPreset.

SaveValues(IEnumerable<SettingPresetValue>)

Saves the Setting preset values.

public void SaveValues(IEnumerable<SettingPresetValue> presetValues)

Parameters

presetValues IEnumerable<SettingPresetValue>

The Setting preset values.

To top