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
keys
IEnumerable<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
key
stringKey to reset
Delete(string)
Deletes instance with the specified parameters.
public virtual void Delete(string id)
Parameters
id
stringThe variant option id.
DeleteByVariantGroup(string)
Deletes instance with the specified parameters.
public virtual void DeleteByVariantGroup(string variantGroupId)
Parameters
variantGroupId
string
DeleteVariantOption(string)
Deletes instance with the specified parameters.
public virtual void DeleteVariantOption(string id)
Parameters
id
stringThe 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
variantGroupId
string
Returns
GetByVariantId(string)
public virtual IList<VariantOption> GetByVariantId(string variantId)
Parameters
variantId
string
Returns
GetVariantOption(string)
Gets the variant option.
public virtual VariantOption GetVariantOption(string id)
Parameters
id
stringThe variant option id
Returns
- VariantOption
The instance of the VariantOption.
Save(VariantOption)
public virtual void Save(VariantOption variantOption)
Parameters
variantOption
VariantOption
SetCacheType<TObjectCache>()
Changes the storage container
public void SetCacheType<TObjectCache>() where TObjectCache : ServiceCache<string, VariantOption>
Type Parameters
TObjectCache