Table of Contents

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

CacheInformation

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 string

Key to reset

Delete(string)

Deletes instance with the specified parameters.

public virtual void Delete(string id)

Parameters

id string

The 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 string

The variant option ID.

GetAll()

public static IEnumerable<VariantOption> GetAll()

Returns

IEnumerable<VariantOption>

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

IList<VariantOption>

GetByVariantId(string)

public virtual IList<VariantOption> GetByVariantId(string variantId)

Parameters

variantId string

Returns

IList<VariantOption>

GetVariantOption(string)

Gets the variant option.

public virtual VariantOption GetVariantOption(string id)

Parameters

id string

The 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
To top