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
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
stringKey to reset
Delete(string)
Deletes the language and its relations.
public virtual void Delete(string languageId)
Parameters
languageId
stringThe language ID.
GetDefaultLanguage()
Gets the default language.
public virtual Language GetDefaultLanguage()
Returns
GetDefaultLanguageId()
Gets the ID of the default language.
public virtual string GetDefaultLanguageId()
Returns
GetLanguage(string)
Gets the language.
public virtual Language GetLanguage(string languageId)
Parameters
languageId
stringThe language ID.
Returns
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
LanguageThe 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