Class UnitOfMeasureService
- Namespace
- Dynamicweb.Ecommerce.Stocks
- Assembly
- Dynamicweb.Ecommerce.dll
public class UnitOfMeasureService : ICacheStorage<string, List<UnitOfMeasure>>, ICacheStorage<string>, ICacheStorage
- Inheritance
-
UnitOfMeasureService
- 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<string>)
Resets the specified keys to the default value for objects stored in the object cache
public virtual void ClearCache(IEnumerable<string> keys)
Parameters
keysIEnumerable<string>Keys to reset
ClearCache(string)
Resets the specified key to the default value for objects stored in the object cache
public virtual void ClearCache(string key)
Parameters
keystringKey to reset
Delete(UnitOfMeasure)
Deletes the unit of measure.
public virtual void Delete(UnitOfMeasure unitOfMeasure)
Parameters
unitOfMeasureUnitOfMeasureThe unit of measure.
GetUnitOfMeasures(string)
Gets unit of measure by a product identifier.
public virtual IEnumerable<UnitOfMeasure> GetUnitOfMeasures(string productId)
Parameters
productIdstringThe product identifier.
Returns
- IEnumerable<UnitOfMeasure>
The products units of measure
Save(UnitOfMeasure)
Saves the unit of measure.
public virtual void Save(UnitOfMeasure unitOfMeasure)
Parameters
unitOfMeasureUnitOfMeasureThe unit of measure.
SetCacheType<TObjectCache>()
Changes the storage container
public virtual void SetCacheType<TObjectCache>() where TObjectCache : ServiceCache<string, List<UnitOfMeasure>>
Type Parameters
TObjectCache