Class VariantOptionService
- Namespace
- Dynamicweb.Ecommerce
- Assembly
- Dynamicweb.Ecommerce.dll
public class VariantOptionService : ICacheStorage<string, VariantOption>, ICacheStorage<string>, ICacheStorage
- Inheritance
-
VariantOptionService
- Implements
- Inherited Members
Properties
Info
Information about the object cache
public CacheInformation Info { get; }
Property Value
Methods
ClearCache()
Clears cached Variant Options.
public void ClearCache()
ClearCache(IEnumerable<string>)
Resets the specified keys to the default value for objects stored in the object cache
public 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 void ClearCache(string key)
Parameters
keystringKey to reset
Delete(string)
Deletes instance with the specified parameters.
public virtual void Delete(string id)
Parameters
idstringThe variant option id.
DeleteByVariantGroup(string)
Deletes instance with the specified parameters.
public virtual void DeleteByVariantGroup(string variantGroupId)
Parameters
variantGroupIdstring
DeleteVariantOption(string)
Deletes instance with the specified parameters.
public virtual void DeleteVariantOption(string id)
Parameters
idstringThe variant option ID.
GetAll()
public static IEnumerable<VariantOption> GetAll()
Returns
GetByGroup(string)
Get all options across all languages, for a given Variant Group ID.
public virtual IList<VariantOption> GetByGroup(string variantGroupId)
Parameters
variantGroupIdstring
Returns
GetByVariantId(string)
public virtual IList<VariantOption> GetByVariantId(string variantId)
Parameters
variantIdstring
Returns
GetVariantOption(string)
Gets the variant option.
public virtual VariantOption? GetVariantOption(string id)
Parameters
idstringThe variant option id
Returns
- VariantOption
The instance of the VariantOption.
Save(VariantOption)
public virtual void Save(VariantOption variantOption)
Parameters
variantOptionVariantOption
SetCacheType<TObjectCache>()
Changes the storage container
public void SetCacheType<TObjectCache>() where TObjectCache : ServiceCache<string, VariantOption>
Type Parameters
TObjectCache