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
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
keysIEnumerable<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
keyintKey to reset
Delete(int)
Delete area color swatch.
public virtual void Delete(int areaId)
Parameters
areaIdintThe area id.
GetColorSwatch(int)
Gets area color swatch.
public virtual ColorSwatch GetColorSwatch(int areaId)
Parameters
areaIdintThe area id.
Returns
GetHexColor(int, string?)
Gets hex value of color.
public virtual string? GetHexColor(int areaId, string? colorName)
Parameters
Returns
Save(ColorSwatch)
Saves the colorSwatch.
public virtual void Save(ColorSwatch colorSwatch)
Parameters
colorSwatchColorSwatchThe area color swatch.
SetCacheType<TObjectCache>()
Changes the storage container
public virtual void SetCacheType<TObjectCache>() where TObjectCache : ServiceCache<int, IDictionary<string, string>>
Type Parameters
TObjectCache