Table of Contents

Class LanguageService

Namespace
Dynamicweb.Ecommerce.International
Assembly
Dynamicweb.Ecommerce.dll

The LanguageService class providing methods for querying and saving the Language Aggregate to and from persistence.

public class LanguageService : ICacheStorage<string, Language>, ICacheStorage<string>, ICacheStorage
Inheritance
LanguageService
Implements
Inherited Members

Properties

Info

Information about the object cache

public CacheInformation Info { get; }

Property Value

CacheInformation

Methods

CleanDefault()

Sets IsDefault to False for all languages in solution.

public virtual void CleanDefault()

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

keys IEnumerable<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

key string

Key to reset

Delete(string)

Deletes the language and its relations.

public virtual void Delete(string languageId)

Parameters

languageId string

The language ID.

GetDefaultLanguage()

Gets the default language.

public virtual Language GetDefaultLanguage()

Returns

Language

GetDefaultLanguageId()

Gets the ID of the default language.

public virtual string GetDefaultLanguageId()

Returns

string

GetLanguage(string)

Gets the language.

public virtual Language GetLanguage(string languageId)

Parameters

languageId string

The language ID.

Returns

Language

The instance of the Language, or null if the language was not found.

GetLanguages()

Gets all languages in solution.

public virtual IEnumerable<Language> GetLanguages()

Returns

IEnumerable<Language>

The collection of the Language.

Save(Language)

Saves the language.

public virtual Language Save(Language language)

Parameters

language Language

The language.

Returns

Language

The language after save.

SetCacheType<TObjectCache>()

Changes the storage container

public void SetCacheType<TObjectCache>() where TObjectCache : ServiceCache<string, Language>

Type Parameters

TObjectCache
To top