Class GeographicCoordinateCriterion
Visitor group criterion that will match the geolocation based on request IP address with the location stored in the settings
Inheritance
System.Object
GeographicCoordinateCriterion
Inherited Members
Namespace: EPiServer.Personalization.VisitorGroups.Criteria
Assembly: EPiServer.Cms.AspNetCore.dll
Version: 12.0.3Syntax
[VisitorGroupCriterion(Category = "Time and Place Criteria", Description = "Match the location of the visitor with selected geographic coordinates", DisplayName = "Geographic Coordinate", LanguagePath = "/shell/cms/visitorgroups/criteria/geographiccoordinate", ScriptShellModuleName = "EPIServer.CMS.UI.VisitorGroups", ScriptUrl = "CriteriaEditors/dist/GeographicCoordinate.js")]
public class GeographicCoordinateCriterion : GeographicCriterionBase<GeographicCoordinateModel>, ICriterion, IGeneratesAdministrativeInterface, ICriterionAvailability
Constructors
GeographicCoordinateCriterion()
Initializes an instance of GeographicCoordinateCriterion.
Declaration
public GeographicCoordinateCriterion()
GeographicCoordinateCriterion(IGeolocationProvider)
Initializes an instance of GeographicCoordinateCriterion.
Declaration
public GeographicCoordinateCriterion(IGeolocationProvider geolocationProvider)
Parameters
Type | Name | Description |
---|---|---|
IGeolocationProvider | geolocationProvider |
GeographicCoordinateCriterion(IGeolocationProvider, IPAddressResolver)
Initializes an instance of GeographicCoordinateCriterion.
Declaration
public GeographicCoordinateCriterion(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 |
|
Overrides
EPiServer.Personalization.VisitorGroups.Criteria.GeographicCriterionBase<EPiServer.Personalization.VisitorGroups.Criteria.GeographicCoordinateModel>.IsMatch(EPiServer.Personalization.IGeolocationResult, EPiServer.Personalization.Capabilities)