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

Class GeographicCriterionBase<T>

Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Base class for geographic criteria

Inheritance
System.Object
GeographicCriterionBase<T>
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.VisitorGroups.Criteria
Assembly: EPiServer.Cms.AspNet.dll
Version: 11.20.7
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(IClientGeolocationResolver)

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

Declaration
public GeographicCriterionBase(IClientGeolocationResolver geolocationResolver)
Parameters
Type Name Description
IClientGeolocationResolver geolocationResolver

GeographicCriterionBase(IGeolocationProvider)

Initializes an instance of GeographicCriterionBase<T>.

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

GeographicCriterionBase(IGeolocationProvider, IPAddressResolver)

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

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

The geolocation provider.

IPAddressResolver addressResolver

The address resolver.

Properties

GeolocationProvider

Returns the configured geolocation provider.

Declaration
[Obsolete("The GeolocationProvider property is no longer guaranteed to return a provider. Take an direct dependcy if needed.")]
protected IGeolocationProvider GeolocationProvider { get; }
Property Value
Type Description
IGeolocationProvider

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

Extension Methods