C# 클래스 Castle.MonoRail.Framework.ControllerLifecycleExecutor

Default implementation of IControllerLifecycleExecutor

Handles the whole controller lifecycle in a request.

상속: IControllerLifecycleExecutor, IServiceEnabledComponent
파일 보기 프로젝트 열기: nats/castle-1.0.3-mono

공개 메소드들

메소드 설명
ControllerLifecycleExecutor ( Controller controller, IRailsEngineContext context ) : System

Initializes a new instance of the ControllerLifecycleExecutor class.

Dispose ( ) : void

Disposes the filters and resources associated with a controller.

InitializeController ( string areaName, string controllerName, string actionName ) : void

Should bring the controller to an usable state by populating its fields with values that represent the current request

PerformErrorHandling ( ) : void

Performs the error handling:

- Tries to run the rescue page
- Throws the exception

ProcessSelectedAction ( ) : void

Executes the method or the dynamic action

ProcessSelectedAction ( IDictionary actionArgs ) : void

Executes the method or the dynamic action with custom arguments

RunStartRequestFilters ( ) : bool

Runs the start request filters.

SelectAction ( string actionName, string controllerName ) : bool

Selects the action to execute based on the url information

SelectAction ( string actionName, string controllerName, IDictionary actionArgs ) : bool

Selects the action to execute based on the url information

Service ( IServiceProvider provider ) : void

Invoked by the framework in order to give a chance to obtain other services

보호된 메소드들

메소드 설명
CopyFilterDescriptors ( ) : Castle.MonoRail.Framework.Internal.FilterDescriptor[]

Clones all Filter descriptors, in order to get a writable copy.

CreateAndInitializeHelpers ( ) : void

Creates the and initialize helpers associated with a controller.

CreateResources ( MethodInfo method ) : void

Creates the resources associated with a controller

GetRescueFor ( IList rescues, Type exceptionType ) : RescueDescriptor

Gets the rescue for the specified exception type.

ObtainDefaultLayoutName ( ) : String

Obtains the name of the default layout.

PerformRescue ( MethodInfo method, Exception ex ) : bool

Performs the rescue.

PrepareTransformFilter ( MethodInfo method ) : void

Prepares the transform filter.

RaiseOnActionExceptionOnExtension ( ) : void

Raises the on action exception on extension.

ReleaseResources ( ) : void

Releases the resources.

ShouldSkip ( MethodInfo method ) : bool

Identifies if no filter should run for the given action.

비공개 메소드들

메소드 설명
CreateFiltersDescriptors ( ) : void
CreateStandardHelpers ( IDictionary helpers ) : void
DisposeFilters ( ) : void
FindOutDefaultMethod ( IDictionary methodArgs ) : MethodInfo

The following lines were added to handle _default processing if present look for and load _default action method DefaultActionAttribute Method arguments

InitializeControllerFieldsFromServiceProvider ( ) : void
PerformAdditionalHelperInitialization ( object helperInstance ) : void

Performs the additional helper initialization checking if the helper instance implements IServiceEnabledComponent.

PrepareResources ( ) : void
PrepareTransformFilter ( ) : void
ProcessFilter ( ExecuteEnum when, FilterDescriptor desc ) : bool
ProcessFilters ( ExecuteEnum when ) : bool
ProcessScaffoldIfPresent ( ) : void

Invokes the scaffold support if the controller is associated with a scaffold

ProcessView ( ) : void
RunAfterActionFilters ( ) : void

Runs the after action filters.

RunAfterRenderFilters ( ) : void

Runs the after view rendering filters.

RunBeforeActionFilters ( ) : bool

Runs the after view rendering filters.

메소드 상세

ControllerLifecycleExecutor() 공개 메소드

Initializes a new instance of the ControllerLifecycleExecutor class.
public ControllerLifecycleExecutor ( Controller controller, IRailsEngineContext context ) : System
controller Controller The controller.
context IRailsEngineContext The context.
리턴 System

CopyFilterDescriptors() 보호된 메소드

Clones all Filter descriptors, in order to get a writable copy.
protected CopyFilterDescriptors ( ) : Castle.MonoRail.Framework.Internal.FilterDescriptor[]
리턴 Castle.MonoRail.Framework.Internal.FilterDescriptor[]

CreateAndInitializeHelpers() 보호된 메소드

Creates the and initialize helpers associated with a controller.
protected CreateAndInitializeHelpers ( ) : void
리턴 void

CreateResources() 보호된 메소드

Creates the resources associated with a controller
protected CreateResources ( MethodInfo method ) : void
method System.Reflection.MethodInfo The method.
리턴 void

Dispose() 공개 메소드

Disposes the filters and resources associated with a controller.
public Dispose ( ) : void
리턴 void

GetRescueFor() 보호된 메소드

Gets the rescue for the specified exception type.
protected GetRescueFor ( IList rescues, Type exceptionType ) : RescueDescriptor
rescues IList The rescues.
exceptionType System.Type Type of the exception.
리턴 Castle.MonoRail.Framework.Internal.RescueDescriptor

InitializeController() 공개 메소드

Should bring the controller to an usable state by populating its fields with values that represent the current request
public InitializeController ( string areaName, string controllerName, string actionName ) : void
areaName string The area name
controllerName string The controller name
actionName string The action name
리턴 void

ObtainDefaultLayoutName() 보호된 메소드

Obtains the name of the default layout.
protected ObtainDefaultLayoutName ( ) : String
리턴 String

PerformErrorHandling() 공개 메소드

Performs the error handling:

- Tries to run the rescue page
- Throws the exception

public PerformErrorHandling ( ) : void
리턴 void

PerformRescue() 보호된 메소드

Performs the rescue.
protected PerformRescue ( MethodInfo method, Exception ex ) : bool
method System.Reflection.MethodInfo The action (can be null in the case of dynamic actions).
ex System.Exception The exception.
리턴 bool

PrepareTransformFilter() 보호된 메소드

Prepares the transform filter.
protected PrepareTransformFilter ( MethodInfo method ) : void
method MethodInfo The method.
리턴 void

ProcessSelectedAction() 공개 메소드

Executes the method or the dynamic action
public ProcessSelectedAction ( ) : void
리턴 void

ProcessSelectedAction() 공개 메소드

Executes the method or the dynamic action with custom arguments
public ProcessSelectedAction ( IDictionary actionArgs ) : void
actionArgs IDictionary The action args.
리턴 void

RaiseOnActionExceptionOnExtension() 보호된 메소드

Raises the on action exception on extension.
protected RaiseOnActionExceptionOnExtension ( ) : void
리턴 void

ReleaseResources() 보호된 메소드

Releases the resources.
protected ReleaseResources ( ) : void
리턴 void

RunStartRequestFilters() 공개 메소드

Runs the start request filters.
public RunStartRequestFilters ( ) : bool
리턴 bool

SelectAction() 공개 메소드

Selects the action to execute based on the url information
public SelectAction ( string actionName, string controllerName ) : bool
actionName string The action name
controllerName string The controller name
리턴 bool

SelectAction() 공개 메소드

Selects the action to execute based on the url information
public SelectAction ( string actionName, string controllerName, IDictionary actionArgs ) : bool
actionName string The action name
controllerName string The controller name
actionArgs IDictionary The action arguments.
리턴 bool

Service() 공개 메소드

Invoked by the framework in order to give a chance to obtain other services
public Service ( IServiceProvider provider ) : void
provider IServiceProvider The service proviver
리턴 void

ShouldSkip() 보호된 메소드

Identifies if no filter should run for the given action.
protected ShouldSkip ( MethodInfo method ) : bool
method MethodInfo The method.
리턴 bool