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

Class SessionStartCookieCriterionBase<T>

An abstract class for a coockie based visitor group criterion using strongly typed settings and automatically generated user interface On session start, a cookie will be created if it's not exist, and the value of the cookie will be set by the implementation

Inheritance
System.Object
SessionStartCookieCriterionBase<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
Assembly: EPiServer.Framework.AspNet.dll
Version: 11.20.7
Syntax
public abstract class SessionStartCookieCriterionBase<T> : CriterionBase<T>, ICriterion, IGeneratesAdministrativeInterface where T : class, ICriterionModel, new()
Type Parameters
Name Description
T

Constructors

SessionStartCookieCriterionBase()

Declaration
public SessionStartCookieCriterionBase()

Properties

CookieExpires

Gets the cookie expires date and time for the cookie. If not override, the value will be DateTime.MinValue

Declaration
protected virtual DateTime CookieExpires { get; }
Property Value
Type Description
System.DateTime

The cookie expires.

CookieKey

Gets the cookie key.

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

The cookie key.

Methods

GetCookie(HttpContextBase)

Gets the cookie.

Declaration
protected HttpCookie GetCookie(HttpContextBase httpContext)
Parameters
Type Name Description
System.Web.HttpContextBase httpContext

The HTTP context.

Returns
Type Description
System.Web.HttpCookie

SetCookieValue(HttpCookie, HttpContextBase)

Sets the cookie value.

Declaration
protected abstract void SetCookieValue(HttpCookie cookie, HttpContextBase httpContext)
Parameters
Type Name Description
System.Web.HttpCookie cookie

The cookie.

System.Web.HttpContextBase httpContext

The HTTP context.

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