C# Class Castle.MonoRail.Framework.Extensions.Session.CustomSessionExtension

This extension allow one to provide a custom implementation of the session available on IEngineContext
To successfully install this extension you must add the attribute customSession to the monoRail configuration node and register the extension on the extensions node. <monoRail customSession="Type name that implements ICustomSessionFactory"> <extensions> <extension type="Castle.MonoRail.Framework.Extensions.Session.CustomSessionExtension, Castle.MonoRail.Framework" /> </extensions> </monoRail>
Inheritance: IMonoRailExtension
Show file Open project: nats/castle-1.0.3-mono

Public Methods

Method Description
Service ( IServiceProvider provider ) : void

Services the specified provider.

SetExtensionConfigNode ( XmlNode node ) : void

Gives to the extension implementor a chance to read attributes and child nodes of the extension node

Private Methods

Method Description
Init ( ExtensionManager manager, Castle.MonoRail.Framework.Configuration.MonoRailConfiguration configuration ) : void

Reads the attribute customSession from MonoRailConfiguration and instantiate it based on the type name provided.

OnAdquireSessionState ( IRailsEngineContext context ) : void

Overrides the ISession instance on IRailsEngineContext.

Note that the session available through IHttpContext is left untouched

OnReleaseSessionState ( IRailsEngineContext context ) : void

Retrives the ISession instance from IRailsEngineContext. and invokes ICustomSessionFactory.PersistSession

Method Details

Service() public method

Services the specified provider.
public Service ( IServiceProvider provider ) : void
provider IServiceProvider The provider.
return void

SetExtensionConfigNode() public method

Gives to the extension implementor a chance to read attributes and child nodes of the extension node
public SetExtensionConfigNode ( XmlNode node ) : void
node System.Xml.XmlNode The node that defines the MonoRail extension
return void