Interface IInitializableModule
Interface that you can implement to be part of the EPiServer Framework initialization chain.
Namespace: EPiServer.Framework
Assembly: EPiServer.Framework.dll
Version: 9.12.2Syntax
public interface IInitializableModule
Remarks
You should set the attribute [InitializableModule] on the class implementing this interface, or if you want to control dependencies (making sure that other modules are initialized before your module gets called) use the attribute [ModuleDependency(typeof(ClassThatIDependOn), ...)].
Methods
Initialize(InitializationEngine)
Initializes this instance.
Declaration
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.
Uninitialize(InitializationEngine)
Resets the module into an uninitialized state.
Declaration
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 InitComplete should be reversed.