November Happy Hour will be moved to Thursday December 5th.

Class GeolocationProviderBase

Base class that can be used for IGeolocationProvider implementations. Provides a default set of Continents and Countries.

Inheritance
System.Object
GeolocationProviderBase
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: EPiServer.Personalization
Assembly: EPiServer.Framework.dll
Version: 11.20.7
Syntax
public abstract class GeolocationProviderBase : IGeolocationProvider

Constructors

GeolocationProviderBase()

Declaration
protected GeolocationProviderBase()

Properties

Capabilities

Get the capabilities of this provider

Declaration
public abstract Capabilities Capabilities { get; }
Property Value
Type Description
Capabilities

Name

Gets the friendly name used to refer to the provider

Declaration
public virtual string Name { get; set; }
Property Value
Type Description
System.String
Remarks

Default name is 'default'

Methods

GetContinentCodes()

Get the list of two-letter continent codes known to this provider

Declaration
public virtual IEnumerable<string> GetContinentCodes()
Returns
Type Description
System.Collections.Generic.IEnumerable<System.String>

GetCountryCodes(String)

Get the list of two-letter country codes known to this provider

Declaration
public virtual IEnumerable<string> GetCountryCodes(string continentCode)
Parameters
Type Name Description
System.String continentCode

Two-letter continent code to filter the list of countries on (may be null)

Returns
Type Description
System.Collections.Generic.IEnumerable<System.String>

GetRegions(String)

Get the list of regions for a country known to this provider

Declaration
public virtual IEnumerable<string> GetRegions(string countryCode)
Parameters
Type Name Description
System.String countryCode

Two-letter country code to filter the list of regions on (may be null)

Returns
Type Description
System.Collections.Generic.IEnumerable<System.String>

Initialize(String, NameValueCollection)

Initializes the provider.

Declaration
public virtual void Initialize(string name, NameValueCollection config)
Parameters
Type Name Description
System.String name

The friendly name of the provider

System.Collections.Specialized.NameValueCollection config

A collection of the name/value pairs representing the provider-specific attributes specified in the configuration for this provider.

Lookup(IPAddress)

Look up IP address in geolocation database

Declaration
public abstract IGeolocationResult Lookup(IPAddress address)
Parameters
Type Name Description
System.Net.IPAddress address

IP address to look up

Returns
Type Description
IGeolocationResult

Geolocation data for the IP address (can be null)

Implements

Extension Methods