C# Класс 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); });
Показать файл Открыть проект

Открытые методы

Метод Описание
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

Приватные методы

Метод Описание
RunAllActionsWithState ( System.Web.HttpApplication app, InitialisationStage initState ) : void
ValidateTheWebApplicationInitialiserModuleIsIncluded ( System.Web.HttpApplication app ) : void

Описание методов

HandleBeginRequest() публичный статический Метод

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
Результат void

HandleBeginRequest() публичный статический Метод

public static HandleBeginRequest ( object sender, EventArgs e ) : void
sender object
e System.EventArgs
Результат void

Setup() публичный статический Метод

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
Результат void

Setup() публичный статический Метод

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
Результат void