Table of Contents

Class PresetService

Namespace
Dynamicweb.Content.Items.Presets
Assembly
Dynamicweb.dll

The PresetService class providing methods for querying and saving the area Preset Aggregate to and from persistence.

public class PresetService
Inheritance
PresetService
Inherited Members

Constructors

PresetService(string)

Initializes a new instance of an object.

public PresetService(string itemType)

Parameters

itemType string

Item type.

Properties

ItemType

Item type.

public string ItemType { get; }

Property Value

string

Methods

Delete(string)

Delete the specified preset

public void Delete(string systemName)

Parameters

systemName string

The preset system name

GetAll()

Get presets

public IEnumerable<Preset> GetAll()

Returns

IEnumerable<Preset>

The preset collection

GetByName(string)

Gets by name

public Preset? GetByName(string systemName)

Parameters

systemName string

The preset system name

Returns

Preset

The preset

GetItemByPreset(string)

Gets preset item

public ItemEntry? GetItemByPreset(string systemName)

Parameters

systemName string

The preset system name

Returns

ItemEntry

The item entry

GetNewSystemName(string)

Get new system name from friendly name

public string GetNewSystemName(string name)

Parameters

name string

The preset name

Returns

string

Save(Preset)

Saves the specified preset

public void Save(Preset preset)

Parameters

preset Preset

The preset

Save(Preset, string)

Saves the specified preset with new system name

public void Save(Preset preset, string newSystemName)

Parameters

preset Preset

The preset

newSystemName string

The preset new system name

SetSelected(string, string, bool)

Set selected preset

public void SetSelected(string itemId, string systemName, bool isModified)

Parameters

itemId string

Item id.

systemName string

The preset system name

isModified bool

Is the preset was modified

TryGetSelected(string, ref SelectedInformation)

Get selected preset

public bool TryGetSelected(string itemId, ref SelectedInformation selected)

Parameters

itemId string

Item id.

selected SelectedInformation

The selected preset

Returns

bool
To top