Class CountryRelationService
- Namespace
- Dynamicweb.Ecommerce.International
- Assembly
- Dynamicweb.Ecommerce.dll
public class CountryRelationService : ICacheStorage<CountryRelationKey, IList<CountryRelation>>, ICacheStorage<CountryRelationKey>, ICacheStorage
- Inheritance
-
CountryRelationService
- Implements
- Inherited Members
Methods
ClearCache()
Clears cached countries.
public void ClearCache()
ClearCache(CountryRelationKey)
Resets the specified key to the default value for objects stored in the object cache
public void ClearCache(CountryRelationKey key)
Parameters
key
CountryRelationKeyKey to reset
ClearCache(IEnumerable<CountryRelationKey>)
Resets the specified keys to the default value for objects stored in the object cache
public void ClearCache(IEnumerable<CountryRelationKey> keys)
Parameters
keys
IEnumerable<CountryRelationKey>Keys to reset
Delete(string)
Deletes an instance with the specified code.
public void Delete(string code2)
Parameters
code2
stringThe country relation code.
Delete(string, string)
Deletes an instance with the specified parameters.
public void Delete(string methodType, string methodId)
Parameters
GetCountryRelation(string, string, string, string)
Gets the country relations.
public CountryRelation GetCountryRelation(string methodType, string methodId, string countryId, string regionCode)
Parameters
methodType
stringThe method type.
methodId
stringThe method id.
countryId
stringThe country id.
regionCode
stringThe region code.
Returns
- CountryRelation
A collection of the CountryRelation.
Remarks
- Return any match on both country AND region.
- Return any match on country where countryRelation.RegionCode Is null Or empty.
- No match was found. Return Nothing.
GetCountryRelations(string, string)
Gets the country relations.
public IEnumerable<CountryRelation> GetCountryRelations(string methodType, string methodId)
Parameters
Returns
- IEnumerable<CountryRelation>
A collection of the CountryRelation.
Save(CountryRelation)
Saves an instance with the specified parameters.
public void Save(CountryRelation relation)
Parameters
relation
CountryRelationThe country relation.
Save(IEnumerable<string>, string, string)
Saves the country relations.
public void Save(IEnumerable<string> countryRelationKeys, string methodType, string methodId)
Parameters
countryRelationKeys
IEnumerable<string>The collection of country relation keys represented as strings.
methodType
stringThe method type.
methodId
stringThe method id.
UpdateDefaultCountryRelation(string, string, string)
Update default country relation
public void UpdateDefaultCountryRelation(string methodType, string countryId, string defaultId)