November Happy Hour will be moved to Thursday December 5th.

Class UriSessionStartCriterionBase<T>

Base class fro Uri criterion

Inheritance
System.Object
UriSessionStartCriterionBase<T>
Namespace: EPiServer.Personalization.VisitorGroups.Criteria
Assembly: EPiServer.Cms.AspNetCore.dll
Version: 12.0.3
Syntax
public abstract class UriSessionStartCriterionBase<T> : CriterionBase<T>, ICriterion, IGeneratesAdministrativeInterface where T : class, ICriterionModel, new()
Type Parameters
Name Description
T

Constructors

UriSessionStartCriterionBase()

Initializes a new instance of the UriSessionStartCriterionBase<T> class.

Declaration
public UriSessionStartCriterionBase()

UriSessionStartCriterionBase(IStateStorage)

Initializes a new instance of the UriSessionStartCriterionBase<T> class.

Declaration
public UriSessionStartCriterionBase(IStateStorage stateStorage)
Parameters
Type Name Description
IStateStorage stateStorage

Properties

SessionKey

Gets or sets the session key.

Declaration
public abstract string SessionKey { get; }
Property Value
Type Description
System.String

The session key.

Methods

GetSession(HttpContext)

Gets the session.

Declaration
protected object GetSession(HttpContext httpContext)
Parameters
Type Name Description
Microsoft.AspNetCore.Http.HttpContext httpContext

The HTTP context.

Returns
Type Description
System.Object

GetUri(HttpContext)

Gets the URI.

Declaration
protected abstract Uri GetUri(HttpContext httpContext)
Parameters
Type Name Description
Microsoft.AspNetCore.Http.HttpContext httpContext

The HTTP context.

Returns
Type Description
System.Uri

IsMatch(IPrincipal, HttpContext)

Determines whether the specified principal is mathced the hostname referer criteria.

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

true if the specified principal is match; otherwise, false.

Overrides
EPiServer.Personalization.VisitorGroups.CriterionBase<T>.IsMatch(System.Security.Principal.IPrincipal, Microsoft.AspNetCore.Http.HttpContext)

IsMatch(Uri)

Determines whether the specified URI is match.

Declaration
protected abstract bool IsMatch(Uri uri)
Parameters
Type Name Description
System.Uri uri

The URI.

Returns
Type Description
System.Boolean

true if the specified URI is match; otherwise, false.

Subscribe(ICriterionEvents)

Called when a criteria instance is initialized. Starts listenen on session start

Declaration
public override void Subscribe(ICriterionEvents criterionEvents)
Parameters
Type Name Description
ICriterionEvents criterionEvents

The criterion notifier.

Overrides
EPiServer.Personalization.VisitorGroups.CriterionBase<T>.Subscribe(EPiServer.Personalization.VisitorGroups.ICriterionEvents)
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 criteria is unloaded, for example because it seetings has been updated. Unsubscribes the session start handler

Declaration
public override void Unsubscribe(ICriterionEvents criterionEvents)
Parameters
Type Name Description
ICriterionEvents criterionEvents
Overrides
EPiServer.Personalization.VisitorGroups.CriterionBase<T>.Unsubscribe(EPiServer.Personalization.VisitorGroups.ICriterionEvents)

Implements

Extension Methods