Class CountryCache
Summary description for CountryFormatInfo.
Inherited Members
Namespace: SuperOffice.CRM.Globalization
Assembly: SoDataBase.dll
Syntax
public class CountryCache : CacheBase, IDisposable, IFlushable
Methods
GetCachedTableNumbers()
Declaration
public override int[] GetCachedTableNumbers()
Returns
Type | Description |
---|---|
Int32[] |
Overrides
GetCountryIds()
Get all country ids
Declaration
public int[] GetCountryIds()
Returns
Type | Description |
---|---|
Int32[] | List of all caountry ids |
GetCurrent()
Get the current instance of the CountryCache
Declaration
public static CountryCache GetCurrent()
Returns
Type | Description |
---|---|
CountryCache | Current instance of the country cache. |
GetFromId(Int32)
Get the Country information object from the countries primary key (this is no longer the phone prefix).
Declaration
public Country GetFromId(int countryId)
Parameters
Type | Name | Description |
---|---|---|
Int32 | countryId | Countries primary key (this is no longer the phone prefix) |
Returns
Type | Description |
---|---|
Country | The Country information object |
GetFromName(String)
Get a the Country information object from it's name. The name can be either 2 or 3 letter ISO abbreviations for the country or the official name of the country in english.
Declaration
public Country GetFromName(string name)
Parameters
Type | Name | Description |
---|---|---|
String | name | Name of the country: 2 and 3 letter ISO abbriviation for the name and name of the country according to ISO. e.g: "no" or "nor", "gb" or "gbr" |
Returns
Type | Description |
---|---|
Country | The Country information object, or null if not found |
GetFromPhoneNumber(String)
Get the Country information object from the country's phone prefix (e.g. "47" returns the CountryRow for Norway).
Declaration
public Country GetFromPhoneNumber(string strippedPhoneNumber)
Parameters
Type | Name | Description |
---|---|---|
String | strippedPhoneNumber |
Returns
Type | Description |
---|---|
Country | The Country information object |
GetFromPhonePrefix(String)
Get the Country information object from the country's phone prefix (e.g. "47" returns the CountryRow for Norway).
Declaration
public Country GetFromPhonePrefix(string phonePrefix)
Parameters
Type | Name | Description |
---|---|---|
String | phonePrefix | International dialing prefix: "+47" or "47" |
Returns
Type | Description |
---|---|
Country | The Country information object, or null if not found |
OnFlush()
Declaration
protected override void OnFlush()
Overrides
OnRefresh()
Declaration
protected override void OnRefresh()
Overrides
ParseMultiLanguageString(String)
Parse a multi-language string according to the default language of the current user's home country
Declaration
public string ParseMultiLanguageString(string multiLangString)
Parameters
Type | Name | Description |
---|---|---|
String | multiLangString | The multilanguage string to parse |
Returns
Type | Description |
---|---|
String | Parsed string; or original string if there is a problem |
Examples
String example from PrefDesc table: US:"Location and size";GE:"Position und Größe";NO:"Posisjon og størrelse"