Class GeographicCriterionBase<T>

Base class for geographic criteria

Inheritance
System.Object
EPiServer.Personalization.VisitorGroups.CriterionBase<T>
GeographicCriterionBase<T>
Implements
EPiServer.Personalization.VisitorGroups.ICriterion
EPiServer.Personalization.VisitorGroups.IGeneratesAdministrativeInterface
Inherited Members
EPiServer.Personalization.VisitorGroups.CriterionBase<T>.Initialize(EPiServer.Personalization.VisitorGroups.VisitorGroupCriterion)
EPiServer.Personalization.VisitorGroups.CriterionBase<T>.Subscribe(EPiServer.Personalization.VisitorGroups.ICriterionEvents)
EPiServer.Personalization.VisitorGroups.CriterionBase<T>.Unsubscribe(EPiServer.Personalization.VisitorGroups.ICriterionEvents)
EPiServer.Personalization.VisitorGroups.CriterionBase<T>.Model
EPiServer.Personalization.VisitorGroups.CriterionBase<T>.EPiServer.Personalization.VisitorGroups.IGeneratesAdministrativeInterface.ModelType
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.VisitorGroups.Criteria
Assembly: EPiServer.dll
Version: 8.11.0
Syntax
public abstract class GeographicCriterionBase<T> : CriterionBase<T>, ICriterion, IGeneratesAdministrativeInterface where T : class, ICriterionModel, new()
Type Parameters
Name Description
T

Constructors

GeographicCriterionBase()

Initializes an instance of GeographicCriterionBase<T>.

Declaration
public GeographicCriterionBase()

GeographicCriterionBase(GeolocationProviderBase)

Initializes an instance of GeographicCriterionBase<T>.

Declaration
public GeographicCriterionBase(GeolocationProviderBase geolocationProvider)
Parameters
Type Name Description
GeolocationProviderBase geolocationProvider

GeographicCriterionBase(GeolocationProviderBase, IPAddressResolver)

Initializes a new instance of the GeographicCriterionBase<T> class.

Declaration
public GeographicCriterionBase(GeolocationProviderBase geolocationProvider, IPAddressResolver addressResolver)
Parameters
Type Name Description
GeolocationProviderBase geolocationProvider

The geolocation provider.

IPAddressResolver addressResolver

The address resolver.

Properties

GeolocationProvider

Returns the configured geolocation provider.

Declaration
protected GeolocationProviderBase GeolocationProvider { get; }
Property Value
Type Description
GeolocationProviderBase

Methods

HasCapabilities(Capabilities, Capabilities)

Checks whether a set of capabilities are available

Declaration
protected bool HasCapabilities(Capabilities capabilities, Capabilities capabilitiesMask)
Parameters
Type Name Description
Capabilities capabilities

The available capabilities

Capabilities capabilitiesMask

The capabilities to check for

Returns
Type Description
System.Boolean

true if the specified capabilities are available; otherwise, false.

IsMatch(IGeolocationResult, Capabilities)

Abstract method which should determine if the location of the client matches the location in settings

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

The location of the client

Capabilities capabilities

The capabilities of the geolocation provider

Returns
Type Description
System.Boolean

true if the looked up location matches the settings; otherwise, false.

IsMatch(IPrincipal, HttpContextBase)

Determines whether the specified principal is match. Will look up the geolocation based on client IP and call a method in derived class to determine if location matches.

Declaration
public override sealed bool IsMatch(IPrincipal principal, HttpContextBase httpContext)
Parameters
Type Name Description
System.Security.Principal.IPrincipal principal

The principal.

System.Web.HttpContextBase httpContext

The HTTP context.

Returns
Type Description
System.Boolean

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

Overrides
EPiServer.Personalization.VisitorGroups.CriterionBase<T>.IsMatch(System.Security.Principal.IPrincipal, System.Web.HttpContextBase)

Implements

EPiServer.Personalization.VisitorGroups.ICriterion
EPiServer.Personalization.VisitorGroups.IGeneratesAdministrativeInterface

Extension Methods