Show / Hide Table of Contents

Class CountryCache

Summary description for CountryFormatInfo.

Inheritance
Object
CacheBase
CountryCache
Implements
IDisposable
IFlushable
Inherited Members
CacheBase._lastUpdated
CacheBase._cacheState
CacheBase.IsCacheInvalidated(Int32, SqlType, Int32)
CacheBase.Dispose()
CacheBase.Validate()
CacheBase.Refresh()
CacheBase.Flush()
CacheBase.OnExpired()
CacheBase.OnRefreshed()
CacheBase.OnFlushed()
CacheBase.OnDisposed()
CacheBase.Lock
CacheBase.Name
CacheBase.CacheType
CacheBase.Timeout
CacheBase.State
CacheBase.IsValid
CacheBase.Expired
CacheBase.Refreshed
CacheBase.Flushed
CacheBase.Disposed
Object.ToString()
Object.Equals(Object)
Object.Equals(Object, Object)
Object.ReferenceEquals(Object, Object)
Object.GetHashCode()
Object.GetType()
Object.MemberwiseClone()
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
CacheBase.GetCachedTableNumbers()

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
CacheBase.OnFlush()

OnRefresh()

Declaration
protected override void OnRefresh()
Overrides
CacheBase.OnRefresh()

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"

Implements

System.IDisposable
IFlushable

Extension Methods

EnumUtil.MapEnums<From, To>(From)
Converters.MapEnums<From, To>(From)
© SuperOffice. All rights reserved.
SuperOffice |  Community |  Release Notes |  Privacy |  Site feedback |  Search Docs |  About Docs |  Contribute |  Back to top