SaaS CMS has officially launched! Learn more now.

Class UriSessionStartCriterionBase<T>

Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Base class fro Uri criterion

Inheritance
System.Object
UriSessionStartCriterionBase<T>
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.Criteria
Assembly: EPiServer.Cms.AspNet.dll
Version: 11.20.7
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(HttpContextBase)

Gets the session.

Declaration
protected object GetSession(HttpContextBase httpContext)
Parameters
Type Name Description
System.Web.HttpContextBase httpContext

The HTTP context.

Returns
Type Description
System.Object

GetUri(HttpContextBase)

Gets the URI.

Declaration
protected abstract Uri GetUri(HttpContextBase httpContext)
Parameters
Type Name Description
System.Web.HttpContextBase httpContext

The HTTP context.

Returns
Type Description
System.Uri

IsMatch(IPrincipal, HttpContextBase)

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

Declaration
public override 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

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

Overrides
EPiServer.Personalization.VisitorGroups.CriterionBase<T>.IsMatch(System.Security.Principal.IPrincipal, System.Web.HttpContextBase)

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