Try our conversational search powered by Generative AI!

Class VisitorGroupHelper

Helper methods for working with visitor groups

Inheritance
System.Object
VisitorGroupHelper
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
Assembly: EPiServer.Framework.AspNet.dll
Version: 11.20.7
Syntax
public class VisitorGroupHelper

Constructors

VisitorGroupHelper()

Declaration
public VisitorGroupHelper()

VisitorGroupHelper(VisitorGroupRoleRepository)

Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Initializes a new instance of the VisitorGroupHelper class.

Declaration
[Obsolete("Use constructor that take IVisitorGroupRoleRepository")]
public VisitorGroupHelper(VisitorGroupRoleRepository repository)
Parameters
Type Name Description
VisitorGroupRoleRepository repository

VisitorGroupHelper(IVisitorGroupRoleRepository)

Initializes a new instance of the VisitorGroupHelper class.

Declaration
public VisitorGroupHelper(IVisitorGroupRoleRepository repository)
Parameters
Type Name Description
IVisitorGroupRoleRepository repository

Methods

IsPrincipalInGroup(IPrincipal, String)

Determines whether the specified principal is in the virtual role

Declaration
public bool IsPrincipalInGroup(IPrincipal principal, string virtualRole)
Parameters
Type Name Description
System.Security.Principal.IPrincipal principal

The principal.

System.String virtualRole

The role.

Returns
Type Description
System.Boolean

true if the specified principal is in the virtual role; otherwise, false.

IsPrincipalInGroup(IPrincipal, String, HttpContextBase)

Determines whether the specified principal is in the virtual role

Declaration
public bool IsPrincipalInGroup(IPrincipal principal, string virtualRole, HttpContextBase httpContext)
Parameters
Type Name Description
System.Security.Principal.IPrincipal principal

The principal.

System.String virtualRole

The role.

System.Web.HttpContextBase httpContext

The HTTP context.

Returns
Type Description
System.Boolean

true if the specified principal is in the virtual role; otherwise, false.

Extension Methods