Table of Contents

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

CacheInformation

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

key CountryKey

Key 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

keys IEnumerable<CountryKey>

Keys to reset

Delete(string)

Deletes an instance with the specified parameters.

public virtual void Delete(string countryCode)

Parameters

countryCode string

The 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

countryCode string

The county two-character code.

languageId string

The language id.

DeleteRegion(string, string)

Deletes an instance with the specified parameters.

public virtual void DeleteRegion(string countryCode, string regionCode)

Parameters

countryCode string

The two-character country code.

regionCode string

The region code.

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

countryCode string

Returns

Country

A country Country.

GetRegion(string, string)

Gets the country.

public virtual Country GetRegion(string countryCode, string regionCode)

Parameters

countryCode string
regionCode string

The region code.

Returns

Country

A country Country.

GetRegions(Country)

Gets regions by the country.

public virtual CountryCollection GetRegions(Country country)

Parameters

country Country

The country.

Returns

CountryCollection

A collection of the Country.

GetRegions(string)

Gets regions by the country code.

public virtual 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 virtual void Save(Country country)

Parameters

country Country

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

Parameters

oldCode2 string

The old two-character code.

newCode2 string

The new two-character code.

To top