C# Class Castle.MonoRail.Framework.EngineContextModule

Provides the services used and shared by the framework. Also is in charge of creating an implementation of IRailsEngineContext upon the start of a new request.
Inheritance: IHttpModule
Exibir arquivo Open project: nats/castle-1.0.3-mono

Public Properties

Property Type Description
Application System.Web.HttpApplication

Private Properties

Property Type Description
CreateController Controller
CreateControllerAndRunStartRequestFilters void
CreateControllerExecutor IControllerLifecycleExecutor
CreateRailsEngineContext IRailsEngineContext
IsMonoRailRequest bool
MarkRequestAsMonoRailRequest void
ObtainContextFromApplication IRailsEngineContext
ObtainRailsEngineContext IRailsEngineContext
OnAcquireRequestState void
OnAuthenticateRequest void
OnAuthorizeRequest void
OnBeginRequest void
OnEndRequest void
OnError void
OnPostRequestHandlerExecute void
OnPreRequestHandlerExecute void
OnReleaseRequestState void
OnResolveRequestCache void
OnStartMonoRailRequest void
OnUpdateRequestCache void
SubscribeToApplicationHooks void

Public Methods

Method Description
CreateAndStartContainer ( System.Web.HttpApplication context ) : void

Creates and starts MonoRail's service container.

Dispose ( ) : void

Disposes of the resources (other than memory) used by the module that implements

Init ( System.Web.HttpApplication context ) : void

Configures the framework, starts the services and application hooks.

Private Methods

Method Description
CreateController ( IRailsEngineContext context ) : Controller

Uses the url information and the controller factory to instantiate the proper controller.

CreateControllerAndRunStartRequestFilters ( object sender, EventArgs e ) : void

Creates the controller, selects the target action and run start request filters.

CreateControllerExecutor ( Controller controller, IRailsEngineContext context ) : IControllerLifecycleExecutor

Creates the and initialize executor.

CreateRailsEngineContext ( HttpContext context ) : IRailsEngineContext
IsMonoRailRequest ( HttpContext context ) : bool
MarkRequestAsMonoRailRequest ( HttpContext context ) : void
ObtainContextFromApplication ( object sender ) : IRailsEngineContext
ObtainRailsEngineContext ( HttpContext context ) : IRailsEngineContext
OnAcquireRequestState ( object sender, EventArgs e ) : void
OnAuthenticateRequest ( object sender, EventArgs e ) : void
OnAuthorizeRequest ( object sender, EventArgs e ) : void
OnBeginRequest ( object sender, EventArgs e ) : void
OnEndRequest ( object sender, EventArgs e ) : void
OnError ( object sender, EventArgs e ) : void
OnPostRequestHandlerExecute ( object sender, EventArgs e ) : void
OnPreRequestHandlerExecute ( object sender, EventArgs e ) : void
OnReleaseRequestState ( object sender, EventArgs e ) : void
OnResolveRequestCache ( object sender, EventArgs e ) : void
OnStartMonoRailRequest ( object sender, EventArgs e ) : void

This method is invoked in response to BeginRequest event. It checks if the request should be treat by MonoRail (by reading the file extension) and if so, creates the IRailsEngineContext instance.

OnUpdateRequestCache ( object sender, EventArgs e ) : void
SubscribeToApplicationHooks ( System.Web.HttpApplication context ) : void

Registers to HttpApplication events

Method Details

CreateAndStartContainer() public method

Creates and starts MonoRail's service container.
public CreateAndStartContainer ( System.Web.HttpApplication context ) : void
context System.Web.HttpApplication
return void

Dispose() public method

Disposes of the resources (other than memory) used by the module that implements
public Dispose ( ) : void
return void

Init() public method

Configures the framework, starts the services and application hooks.
public Init ( System.Web.HttpApplication context ) : void
context System.Web.HttpApplication
return void

Property Details

Application public_oe static_oe property

On Mono, WindsorContainerAccessorUtil needs this due to the initialization order differing to Microsoft's implementation
public static HttpApplication,System.Web Application
return System.Web.HttpApplication