Table of Contents

Class ColorSwatchService

Namespace
Dynamicweb.Content.Items
Assembly
Dynamicweb.dll

The ColorSwatchService class providing methods for querying and saving the area ColorSwatch Aggregate to and from persistence.

public class ColorSwatchService : ICacheStorage<int, IDictionary<string, string>>, ICacheStorage<int>, ICacheStorage
Inheritance
ColorSwatchService
Implements
Inherited Members

Properties

Info

Information about the object cache

public virtual CacheInformation Info { get; }

Property Value

CacheInformation

Methods

ClearCache()

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

public virtual void ClearCache()

ClearCache(IEnumerable<int>)

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

public virtual 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 virtual void ClearCache(int key)

Parameters

key int

Key to reset

Delete(int)

Delete area color swatch.

public virtual void Delete(int areaId)

Parameters

areaId int

The area id.

GetColorSwatch(int)

Gets area color swatch.

public virtual ColorSwatch GetColorSwatch(int areaId)

Parameters

areaId int

The area id.

Returns

ColorSwatch

GetHexColor(int, string?)

Gets hex value of color.

public virtual string? GetHexColor(int areaId, string? colorName)

Parameters

areaId int

The area id.

colorName string

The name of color in the area color swatch.

Returns

string

Save(ColorSwatch)

Saves the colorSwatch.

public virtual void Save(ColorSwatch colorSwatch)

Parameters

colorSwatch ColorSwatch

The area color swatch.

SetCacheType<TObjectCache>()

Changes the storage container

public virtual void SetCacheType<TObjectCache>() where TObjectCache : ServiceCache<int, IDictionary<string, string>>

Type Parameters

TObjectCache
To top