Try our conversational search powered by Generative AI!

Class VisitorGroupInitialization

Initialization module for visitor groups

Inheritance
System.Object
VisitorGroupInitialization
Namespace: EPiServer.Personalization.VisitorGroups
Assembly: EPiServer.Framework.AspNetCore.dll
Version: 12.0.3
Syntax
[ModuleDependency]
[ModuleDependency]
[InitializableModule]
public class VisitorGroupInitialization : Object, IInitializableModule

Constructors

VisitorGroupInitialization()

Creates new instances of VisitorGroupInitialization

Declaration
public VisitorGroupInitialization()

Methods

Initialize(InitializationEngine)

Register the visitor groups into the Virtual Role System.

Declaration
public void Initialize(InitializationEngine context)
Parameters
Type Name Description
InitializationEngine context

The context.

Remarks

Gets called as part of the EPiServer Framework initialization sequence. Note that it will be called only once per AppDomain, unless the method throws an exception. If an exception is thrown, the initialization method will be called repeadetly for each request reaching the site until the method succeeds.

The "called once" guarantee uses the IsIntialized property as defined on this interface. The value of this property will be set by the EPiServer Framework initialization system and you should not set it directly.

Uninitialize(InitializationEngine)

Unregister visitor groups from virtual roles system and its repository.

Declaration
public void Uninitialize(InitializationEngine context)
Parameters
Type Name Description
InitializationEngine context

The context.

Remarks

This method is usually not called when running under a web application since the web app may be shut down very abruptly, but your module should still implement it properly since it will make integration and unit testing much simpler.

Any work done by Initialize(InitializationEngine) as well as any code executing on InitializationEngine.InitComplete should be reversed.

Implements

Extension Methods