Class GeographicCriterionBase<T>
Base class for geographic criteria
Inheritance
Implements
Inherited Members
Namespace: EPiServer.Personalization.VisitorGroups.Criteria
Assembly: EPiServer.dll
Version: 8.11.0Syntax
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 |
|
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 |
|