Class CountryService
- Namespace
- Dynamicweb.Ecommerce.International
- Assembly
- Dynamicweb.Ecommerce.dll
public class CountryService : ICacheStorage<CountryKey, Country>, ICacheStorage<CountryKey>, ICacheStorage
- Inheritance
-
CountryService
- Implements
- Inherited Members
Methods
ClearCache()
Clears cached countries.
public void ClearCache()
ClearCache(CountryKey)
Resets the specified key to the default value for objects stored in the object cache
public void ClearCache(CountryKey key)
Parameters
key
CountryKey- Key to reset
ClearCache(IEnumerable<CountryKey>)
Resets the specified keys to the default value for objects stored in the object cache
public void ClearCache(IEnumerable<CountryKey> keys)
Parameters
keys
IEnumerable<CountryKey>- Keys to reset
Delete(string)
Deletes an instance with the specified parameters.
public void Delete(string countryCode)
Parameters
countryCode
string- The two-character country code.
DeleteCountryText(string, string)
[Obsolete("Use DeleteCountryTranslations")]
public void DeleteCountryText(string countryCode, string languageId)
Parameters
DeleteCountryTranslations(string, string)
Deletes translation in a given language for a country and its regions.
public void DeleteCountryTranslations(string countryCode, string languageId)
Parameters
DeleteRegion(string, string)
Deletes an instance with the specified parameters.
public void DeleteRegion(string countryCode, string regionCode)
Parameters
GetCountries()
Gets the countries.
public CountryCollection GetCountries()
Returns
- CountryCollection
- A collection of the Country.
GetCountry(string)
Gets the country.
public Country GetCountry(string countryCode)
Parameters
countryCode
string
Returns
GetRegion(string, string)
Gets the country.
public Country GetRegion(string countryCode, string regionCode)
Parameters
Returns
GetRegions(string)
Gets regions by the country code.
public CountryCollection GetRegions(string countryCode)
Parameters
countryCode
string- The country code.
Returns
- CountryCollection
- A collection of the Country.
Save(Country)
Saves an instance with the specified parameters.
public void Save(Country country)
Parameters
country
Country- The country
UpdateCountryCode(string, string)
Update country and its relations with a new Code.
public void UpdateCountryCode(string oldCode2, string newCode2)