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

Class GeographicLocationCriterion

Visitor group criterion that will match the geolocation based on request IP address with the location stored in the settings

Inheritance
System.Object
GeographicLocationCriterion
Namespace: EPiServer.Personalization.VisitorGroups.Criteria
Assembly: EPiServer.Cms.AspNetCore.dll
Version: 12.0.3
Syntax
[VisitorGroupCriterion(Category = "Time and Place Criteria", Description = "Match visitor by selection of geographic location", DisplayName = "Geographic Location", LanguagePath = "/shell/cms/visitorgroups/criteria/geographiclocation", ScriptShellModuleName = "EPIServer.CMS.UI.VisitorGroups", ScriptUrl = "CriteriaEditors/dist/GeographicLocation.js")]
public class GeographicLocationCriterion : GeographicCriterionBase<GeographicLocationModel>, ICriterion, IGeneratesAdministrativeInterface, ICriterionAvailability

Constructors

GeographicLocationCriterion()

Initializes an instance of GeographicLocationCriterion.

Declaration
public GeographicLocationCriterion()

GeographicLocationCriterion(IGeolocationProvider)

Initializes an instance of GeographicLocationCriterion.

Declaration
public GeographicLocationCriterion(IGeolocationProvider geolocationProvider)
Parameters
Type Name Description
IGeolocationProvider geolocationProvider

GeographicLocationCriterion(IGeolocationProvider, IPAddressResolver)

Initializes an instance of GeographicLocationCriterion.

Declaration
public GeographicLocationCriterion(IGeolocationProvider geolocationProvider, IPAddressResolver addressResolver)
Parameters
Type Name Description
IGeolocationProvider geolocationProvider

The geolocation provider.

IPAddressResolver addressResolver

The address resolver.

Methods

IsMatch(IGeolocationResult, Capabilities)

Determines whether the specified principal is match. Will match the geolocation of the client with the location stored in the settings

Declaration
protected override bool IsMatch(IGeolocationResult location, Capabilities capabilities)
Parameters
Type Name Description
IGeolocationResult location

The location of the client.

Capabilities capabilities

The capabilities of the geolocation system in use.

Returns
Type Description
System.Boolean

true if the specified principal is match; otherwise, false.

Overrides
EPiServer.Personalization.VisitorGroups.Criteria.GeographicCriterionBase<EPiServer.Personalization.VisitorGroups.Criteria.GeographicLocationModel>.IsMatch(EPiServer.Personalization.IGeolocationResult, EPiServer.Personalization.Capabilities)

Implements

Extension Methods