C# Class Aqueduct.Web.WebApplicationInitialiser

It is used to make initialision of components easier and remove the clutter from Application start. If actions need to be initialised on FirstRequest then a call to BeginRequestHandler should be inserted in Application_BeginRequest WebApplicationInitialiser.Setup(this, initActionList => { initActionList.Add(new DefaultConfigInitialiser()); // initialises the webconfig initActionList.AddOnStartAction(app => /* init logic here */ Logging.Initialise); });
Show file Open project: aqueduct/Aqueduct.SitecoreLib

Public Methods

Method Description
HandleBeginRequest ( System.Web.HttpApplication app ) : void

Used to initialise all OnFirstRequest actions

Should be called on Application_BeginRequest inside Global.asax

HandleBeginRequest ( object sender, EventArgs e ) : void
Setup ( System.Web.HttpApplication application, Action addActionLists ) : void

Used to Setup the list of initialisation actions and executes all OnApplicationStart actions

Setup ( System.Web.HttpApplication app, InitialisationActionList actions ) : void

Used to Setup the list of initialisation actions and executes all OnApplicationStart actions

Private Methods

Method Description
RunAllActionsWithState ( System.Web.HttpApplication app, InitialisationStage initState ) : void
ValidateTheWebApplicationInitialiserModuleIsIncluded ( System.Web.HttpApplication app ) : void

Method Details

HandleBeginRequest() public static method

Used to initialise all OnFirstRequest actions
Should be called on Application_BeginRequest inside Global.asax
public static HandleBeginRequest ( System.Web.HttpApplication app ) : void
app System.Web.HttpApplication Current HttpApplication object
return void

HandleBeginRequest() public static method

public static HandleBeginRequest ( object sender, EventArgs e ) : void
sender object
e System.EventArgs
return void

Setup() public static method

Used to Setup the list of initialisation actions and executes all OnApplicationStart actions
public static Setup ( System.Web.HttpApplication application, Action addActionLists ) : void
application System.Web.HttpApplication Current HttpApplication object
addActionLists Action Delegate with ActionList to which InitialisionActions can be added
return void

Setup() public static method

Used to Setup the list of initialisation actions and executes all OnApplicationStart actions
public static Setup ( System.Web.HttpApplication app, InitialisationActionList actions ) : void
app System.Web.HttpApplication Current HttpApplication object
actions InitialisationActionList A list of initialisation actions
return void