Class VisitorGroupMembershipCriterion
Criterion which checks if visitor is member or not member of another visitor group
Inheritance
System.Object
VisitorGroupMembershipCriterion
Inherited Members
Namespace: EPiServer.Personalization.VisitorGroups.Criteria
Assembly: EPiServer.Cms.AspNetCore.dll
Version: 12.0.3Syntax
[VisitorGroupCriterion(Category = "Visitor Groups", Description = "Match an existing visitor group", DisplayName = "Visitor Group Membership", LanguagePath = "/shell/cms/visitorgroups/criteria/visitorgroup", ScriptShellModuleName = "EPIServer.CMS.UI.VisitorGroups", ScriptUrl = "CriteriaEditors/dist/VisitorGroupMembership.js")]
public class VisitorGroupMembershipCriterion : CriterionBase<VisitorGroupMembershipModel>, ICriterion, IGeneratesAdministrativeInterface
Constructors
VisitorGroupMembershipCriterion()
Initializes an instance of VisitorGroupMembershipCriterion.
Declaration
public VisitorGroupMembershipCriterion()
VisitorGroupMembershipCriterion(IVisitorGroupRepository, IVisitorGroupRoleRepository)
Initializes an instance of VisitorGroupMembershipCriterion.
Declaration
public VisitorGroupMembershipCriterion(IVisitorGroupRepository visitorGroupRepository, IVisitorGroupRoleRepository visitorGroupRoleRepository)
Parameters
Type | Name | Description |
---|---|---|
IVisitorGroupRepository | visitorGroupRepository | |
IVisitorGroupRoleRepository | visitorGroupRoleRepository |
Methods
IsMatch(IPrincipal, HttpContext)
Determines whether the specified principal is match.
Declaration
public override 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 |
|
Overrides
EPiServer.Personalization.VisitorGroups.CriterionBase<EPiServer.Personalization.VisitorGroups.Criteria.VisitorGroupMembershipModel>.IsMatch(System.Security.Principal.IPrincipal, Microsoft.AspNetCore.Http.HttpContext)
Subscribe(ICriterionEvents)
Subscribes the DeletingVisitorGroup event to prevent deleting of group that is used in this criterion.
Declaration
public override void Subscribe(ICriterionEvents criterionEvents)
Parameters
Type | Name | Description |
---|---|---|
ICriterionEvents | criterionEvents | The criterion events. |
Overrides
EPiServer.Personalization.VisitorGroups.CriterionBase<EPiServer.Personalization.VisitorGroups.Criteria.VisitorGroupMembershipModel>.Subscribe(EPiServer.Personalization.VisitorGroups.ICriterionEvents)
Unsubscribe(ICriterionEvents)
Subscribes the DeletingVisitorGroup event
Declaration
public override void Unsubscribe(ICriterionEvents criterionEvents)
Parameters
Type | Name | Description |
---|---|---|
ICriterionEvents | criterionEvents | The criterion events. |
Overrides
EPiServer.Personalization.VisitorGroups.CriterionBase<EPiServer.Personalization.VisitorGroups.Criteria.VisitorGroupMembershipModel>.Unsubscribe(EPiServer.Personalization.VisitorGroups.ICriterionEvents)