Class GeographicCriterionBase<T>
Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Base class for geographic criteria
Inheritance
Inherited Members
Namespace: EPiServer.Personalization.VisitorGroups.Criteria
Assembly: EPiServer.Cms.AspNet.dll
Version: 11.20.7Syntax
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 | 
 | 
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 | 
 | 
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 | 
 | 
