Class CountryService
- Namespace
- Dynamicweb.Ecommerce.International
- Assembly
- Dynamicweb.Ecommerce.dll
public class CountryService : ICacheStorage<CountryKey, Country>, ICacheStorage<CountryKey>, ICacheStorage
- Inheritance
-
CountryService
- Implements
- Inherited Members
Properties
Info
Information about the object cache
public virtual CacheInformation Info { get; }
Property Value
Methods
ClearCache()
Clears cached countries.
public virtual void ClearCache()
ClearCache(CountryKey)
Resets the specified key to the default value for objects stored in the object cache
public virtual void ClearCache(CountryKey key)
Parameters
keyCountryKeyKey to reset
ClearCache(IEnumerable<CountryKey>)
Resets the specified keys to the default value for objects stored in the object cache
public virtual void ClearCache(IEnumerable<CountryKey> keys)
Parameters
keysIEnumerable<CountryKey>Keys to reset
Delete(string)
Deletes an instance with the specified parameters.
public virtual void Delete(string countryCode)
Parameters
countryCodestringThe two-character country code.
DeleteCountryTranslations(string, string)
Deletes translation in a given language for a country and its regions.
public virtual void DeleteCountryTranslations(string countryCode, string languageId)
Parameters
DeleteRegion(string, string)
Deletes an instance with the specified parameters.
public virtual void DeleteRegion(string countryCode, string regionCode)
Parameters
GetCountries()
Gets the countries.
public virtual CountryCollection GetCountries()
Returns
- CountryCollection
A collection of the Country.
GetCountry(string)
Gets the country.
public virtual Country? GetCountry(string countryCode)
Parameters
countryCodestring
Returns
GetRegion(string, string)
Gets the country.
public virtual Country? GetRegion(string countryCode, string regionCode)
Parameters
Returns
GetRegions(Country)
Gets regions by the country.
public virtual CountryCollection GetRegions(Country country)
Parameters
countryCountryThe country.
Returns
- CountryCollection
A collection of the Country.
GetRegions(string)
Gets regions by the country code.
public virtual CountryCollection GetRegions(string countryCode)
Parameters
countryCodestringThe country code.
Returns
- CountryCollection
A collection of the Country.
Save(Country)
Saves an instance with the specified parameters.
public virtual void Save(Country country)
Parameters
countryCountryThe country
SetCacheType<TObjectCache>()
Changes the storage container
public virtual void SetCacheType<TObjectCache>() where TObjectCache : ServiceCache<CountryKey, Country>
Type Parameters
TObjectCache
UpdateCountryCode(string, string)
Update country and its relations with a new Code.
public virtual void UpdateCountryCode(string oldCode2, string newCode2)