Interface ICriterion
Interface for visitor group criteria
Namespace: EPiServer.Personalization.VisitorGroups
Assembly: EPiServer.Framework.AspNetCore.dll
Version: 12.0.3Syntax
public interface ICriterion
Remarks
Do not implement this interface, instead use the CriterionBase<T> class.
Methods
Initialize(VisitorGroupCriterion)
Initializes the criterion with its previously stored settings
Declaration
void Initialize(VisitorGroupCriterion visitorGroupCriterion)
Parameters
Type | Name | Description |
---|---|---|
VisitorGroupCriterion | visitorGroupCriterion | The stored instance of this criterion. |
IsMatch(IPrincipal, HttpContext)
Determines whether the specified principal and/or context matches the criteria.
Declaration
bool IsMatch(IPrincipal principal, HttpContext httpContext)
Parameters
Type | Name | Description |
---|---|---|
System.Security.Principal.IPrincipal | principal | The principal. |
Microsoft.AspNetCore.Http.HttpContext | httpContext | The HTTP context. |
Returns
Type | Description |
---|---|
System.Boolean |
|
Subscribe(ICriterionEvents)
Called when a criterion instance is initialized. An instance has here the opportunity to subscribe to desired events.
Declaration
void Subscribe(ICriterionEvents criterionEvents)
Parameters
Type | Name | Description |
---|---|---|
ICriterionEvents | criterionEvents | The criterion notifier. |
Remarks
Any event subscribed to in this method should be unsubscribed in method Unsubscribe. The reason for this is that otherwise there will be "dangling" event handlers.
Unsubscribe(ICriterionEvents)
Called when a criterion is unloaded, for example because it seetings has been updated. Here any events subscribed to in method Subscribe should be unsubscribed to to avoid "dangling" event handlers.
Declaration
void Unsubscribe(ICriterionEvents criterionEvents)
Parameters
Type | Name | Description |
---|---|---|
ICriterionEvents | criterionEvents | The criterion notifier. |