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

Implements the core functionality and exposes the common methods for concrete controllers.
상속: IAsyncController, IValidatorAccessor, IRedirectSupport
파일 보기 프로젝트 열기: nats/castle-1.0.3-mono 1 사용 예제들

Private Properties

프로퍼티 타입 설명
RedirectToReferer void
ResetIsPostback void
SetEvaluatedAction void
TransformActionName string

공개 메소드들

메소드 설명
CancelLayout ( ) : void

Cancels the layout processing.

CancelView ( ) : void

Cancels the view processing.

Controller ( ) : System

Constructs a Controller

DeliverEmail ( Message message ) : void

Attempts to deliver the Message using the server specified on the web.config.

DirectRender ( string contents ) : void

Sends raw contents to be rendered directly by the view engine. It's up to the view engine just to apply the layout and nothing else.

Dispose ( ) : void

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

HasTemplate ( string templateName ) : bool

Returns true if the specified template exists.

InPlaceRenderSharedView ( TextWriter output, string name ) : void

Specifies the shared view to be processed and results are written to System.IO.TextWriter. (A partial view shared by others views and usually in the root folder of the view directory).

InPlaceRenderView ( TextWriter output, string name ) : void

Specifies the view to be processed and results are written to System.IO.TextWriter.

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

Initializes the state of the controller.

InitializeFieldsFromServiceProvider ( IRailsEngineContext context ) : void

Extracts the services the controller uses from the context -- which ultimately is a service provider.

PostSendView ( object view ) : void

Invoked by the view engine to perform any logic after the view had been sent to the client.

PreSendView ( object view ) : void

Invoked by the view engine to perform any logic before the view is sent to the client.

Redirect ( string url ) : void

Redirects to the specified URL. All other Redirects call this one.

Redirect ( string url, IDictionary parameters ) : void

Redirects to the specified URL.

Redirect ( string url, NameValueCollection parameters ) : void

Redirects to the specified URL.

Redirect ( string controller, string action ) : void

Redirects to another controller and action.

Redirect ( string controller, string action, IDictionary parameters ) : void

Redirects to another controller and action with the specified paramters.

Redirect ( string controller, string action, NameValueCollection parameters ) : void

Redirects to another controller and action with the specified paramters.

Redirect ( string area, string controller, string action ) : void

Redirects to another controller and action.

Redirect ( string area, string controller, string action, IDictionary parameters ) : void

Redirects to another controller and action with the specified paramters.

Redirect ( string area, string controller, string action, NameValueCollection parameters ) : void

Redirects to another controller and action with the specified paramters.

RedirectToSiteRoot ( ) : void

Redirects to the site root directory (Context.ApplicationPath + "/").

RenderEmailAndSend ( string templateName ) : void

Renders and delivers the e-mail message. DeliverEmail

RenderMailMessage ( string templateName ) : Message

Creates an instance of Message using the specified template for the body

RenderMailMessage ( string templateName, bool doNotApplyLayout ) : Message

Creates an instance of Message using the specified template for the body

RenderSharedView ( string name ) : void

Specifies the shared view to be processed after the action has finished its processing. (A partial view shared by others views and usually in the root folder of the view directory).

RenderSharedView ( string name, bool skipLayout ) : void

Specifies the shared view to be processed after the action has finished its processing. (A partial view shared by others views and usually in the root folder of the view directory).

RenderText ( IFormatProvider formatProvider, string contents ) : void

Cancels the view processing and writes the specified contents to the browser

RenderText ( string contents ) : void

Cancels the view processing and writes the specified contents to the browser

RenderView ( string name ) : void

Specifies the view to be processed after the action has finished its processing.

RenderView ( string name, bool skipLayout ) : void

Specifies the view to be processed after the action has finished its processing.

RenderView ( string name, bool skipLayout, string mimeType ) : void

Specifies the view to be processed after the action has finished its processing.

RenderView ( string controller, string name ) : void

Specifies the view to be processed after the action has finished its processing.

RenderView ( string controller, string name, bool skipLayout ) : void

Specifies the view to be processed after the action has finished its processing.

RenderView ( string controller, string name, bool skipLayout, string mimeType ) : void

Specifies the view to be processed after the action has finished its processing.

RenderView ( string controller, string name, string mimeType ) : void

Specifies the view to be processed after the action has finished its processing.

Send ( string action ) : void

Performs the specified action, which means:
1. Define the default view name
2. Run the before filters
3. Select the method related to the action name and invoke it
4. On error, execute the rescues if available
5. Run the after filters
6. Invoke the view engine

Send ( string action, IDictionary actionArgs ) : void

Performs the specified action with arguments.

보호된 메소드들

메소드 설명
CreateValidatorRunner ( IValidatorRegistry validatorRegistry ) : Castle.Components.Validator.ValidatorRunner

Creates the default validator runner.

You can override this method to create a runner with some different configuration

Initialize ( ) : void

Initializes this instance. Implementors can use this method to perform initialization

InternalSend ( string action, IDictionary actionArgs ) : void

Performs the specified action, which means:
1. Define the default view name
2. Run the before filters
3. Select the method related to the action name and invoke it
4. On error, execute the rescues if available
5. Run the after filters
6. Invoke the view engine

InvokeMethod ( MethodInfo method, IDictionary methodArgs ) : void

Pendent

InvokeMethod ( MethodInfo method, IRequest request, IDictionary methodArgs ) : void

Pendent

RedirectToAction ( string action ) : void

Redirects to another action in the same controller.

RedirectToAction ( string action, IDictionary queryStringParameters ) : void

Redirects to another action in the same controller.

RedirectToAction ( string action, NameValueCollection queryStringParameters ) : void

Redirects to another action in the same controller.

RedirectToReferrer ( ) : void

Redirects to the referrer action, according to the "HTTP_REFERER" header (Context.UrlReferrer).

SelectMethod ( string action, IDictionary actions, IRequest request, IDictionary actionArgs ) : MethodInfo

Pendent

ToQueryString ( IDictionary parameters ) : string

Creates a querystring string representation of the entries in the dictionary.

ToQueryString ( NameValueCollection parameters ) : string

Creates a querystring string representation of the namevalue collection.

비공개 메소드들

메소드 설명
RedirectToReferer ( ) : void
ResetIsPostback ( ) : void

To preserve standard Action semantics when using ASP.NET Views, the event handlers in the CodeBehind typically call Send(String). As a result, the IsPostBack property must be logically cleared to allow the Action to behave as if it was called directly.

SetEvaluatedAction ( string actionName ) : void

Sets the evaluated action.

TransformActionName ( string action ) : string

Gives a chance to subclasses to format the action name properly WizardStepPage

메소드 상세

CancelLayout() 공개 메소드

Cancels the layout processing.
public CancelLayout ( ) : void
리턴 void

CancelView() 공개 메소드

Cancels the view processing.
public CancelView ( ) : void
리턴 void

Controller() 공개 메소드

Constructs a Controller
public Controller ( ) : System
리턴 System

CreateValidatorRunner() 보호된 메소드

Creates the default validator runner.
You can override this method to create a runner with some different configuration
protected CreateValidatorRunner ( IValidatorRegistry validatorRegistry ) : Castle.Components.Validator.ValidatorRunner
validatorRegistry IValidatorRegistry The validator registry.
리턴 Castle.Components.Validator.ValidatorRunner

DeliverEmail() 공개 메소드

Attempts to deliver the Message using the server specified on the web.config.
public DeliverEmail ( Message message ) : void
message Message The instance of System.Web.Mail.MailMessage that will be sent
리턴 void

DirectRender() 공개 메소드

Sends raw contents to be rendered directly by the view engine. It's up to the view engine just to apply the layout and nothing else.
public DirectRender ( string contents ) : void
contents string Contents to be rendered.
리턴 void

Dispose() 공개 메소드

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
public Dispose ( ) : void
리턴 void

HasTemplate() 공개 메소드

Returns true if the specified template exists.
public HasTemplate ( string templateName ) : bool
templateName string
리턴 bool

InPlaceRenderSharedView() 공개 메소드

Specifies the shared view to be processed and results are written to System.IO.TextWriter. (A partial view shared by others views and usually in the root folder of the view directory).
public InPlaceRenderSharedView ( TextWriter output, string name ) : void
output System.IO.TextWriter
name string The name of the view to process.
리턴 void

InPlaceRenderView() 공개 메소드

Specifies the view to be processed and results are written to System.IO.TextWriter.
public InPlaceRenderView ( TextWriter output, string name ) : void
output System.IO.TextWriter
name string The name of the view to process.
리턴 void

Initialize() 보호된 메소드

Initializes this instance. Implementors can use this method to perform initialization
protected Initialize ( ) : void
리턴 void

InitializeControllerState() 공개 메소드

Initializes the state of the controller.
public InitializeControllerState ( string areaName, string controllerName, string actionName ) : void
areaName string Name of the area.
controllerName string Name of the controller.
actionName string Name of the action.
리턴 void

InitializeFieldsFromServiceProvider() 공개 메소드

Extracts the services the controller uses from the context -- which ultimately is a service provider.
public InitializeFieldsFromServiceProvider ( IRailsEngineContext context ) : void
context IRailsEngineContext The context/service provider.
리턴 void

InternalSend() 보호된 메소드

Performs the specified action, which means:
1. Define the default view name
2. Run the before filters
3. Select the method related to the action name and invoke it
4. On error, execute the rescues if available
5. Run the after filters
6. Invoke the view engine
protected InternalSend ( string action, IDictionary actionArgs ) : void
action string Action name
actionArgs IDictionary Action arguments
리턴 void

InvokeMethod() 보호된 메소드

Pendent
protected InvokeMethod ( MethodInfo method, IDictionary methodArgs ) : void
method System.Reflection.MethodInfo
methodArgs IDictionary
리턴 void

InvokeMethod() 보호된 메소드

Pendent
protected InvokeMethod ( MethodInfo method, IRequest request, IDictionary methodArgs ) : void
method System.Reflection.MethodInfo
request IRequest
methodArgs IDictionary
리턴 void

PostSendView() 공개 메소드

Invoked by the view engine to perform any logic after the view had been sent to the client.
public PostSendView ( object view ) : void
view object
리턴 void

PreSendView() 공개 메소드

Invoked by the view engine to perform any logic before the view is sent to the client.
public PreSendView ( object view ) : void
view object
리턴 void

Redirect() 공개 메소드

Redirects to the specified URL. All other Redirects call this one.
public Redirect ( string url ) : void
url string Target URL
리턴 void

Redirect() 공개 메소드

Redirects to the specified URL.
public Redirect ( string url, IDictionary parameters ) : void
url string Target URL
parameters IDictionary URL parameters
리턴 void

Redirect() 공개 메소드

Redirects to the specified URL.
public Redirect ( string url, NameValueCollection parameters ) : void
url string Target URL
parameters System.Collections.Specialized.NameValueCollection URL parameters
리턴 void

Redirect() 공개 메소드

Redirects to another controller and action.
public Redirect ( string controller, string action ) : void
controller string Controller name
action string Action name
리턴 void

Redirect() 공개 메소드

Redirects to another controller and action with the specified paramters.
public Redirect ( string controller, string action, IDictionary parameters ) : void
controller string Controller name
action string Action name
parameters IDictionary Key/value pairings
리턴 void

Redirect() 공개 메소드

Redirects to another controller and action with the specified paramters.
public Redirect ( string controller, string action, NameValueCollection parameters ) : void
controller string Controller name
action string Action name
parameters System.Collections.Specialized.NameValueCollection Key/value pairings
리턴 void

Redirect() 공개 메소드

Redirects to another controller and action.
public Redirect ( string area, string controller, string action ) : void
area string Area name
controller string Controller name
action string Action name
리턴 void

Redirect() 공개 메소드

Redirects to another controller and action with the specified paramters.
public Redirect ( string area, string controller, string action, IDictionary parameters ) : void
area string Area name
controller string Controller name
action string Action name
parameters IDictionary Key/value pairings
리턴 void

Redirect() 공개 메소드

Redirects to another controller and action with the specified paramters.
public Redirect ( string area, string controller, string action, NameValueCollection parameters ) : void
area string Area name
controller string Controller name
action string Action name
parameters System.Collections.Specialized.NameValueCollection Key/value pairings
리턴 void

RedirectToAction() 보호된 메소드

Redirects to another action in the same controller.
protected RedirectToAction ( string action ) : void
action string The action name
리턴 void

RedirectToAction() 보호된 메소드

Redirects to another action in the same controller.
protected RedirectToAction ( string action, IDictionary queryStringParameters ) : void
action string The action name
queryStringParameters IDictionary Query string entries
리턴 void

RedirectToAction() 보호된 메소드

Redirects to another action in the same controller.
protected RedirectToAction ( string action, NameValueCollection queryStringParameters ) : void
action string The action name
queryStringParameters System.Collections.Specialized.NameValueCollection Query string entries
리턴 void

RedirectToReferrer() 보호된 메소드

Redirects to the referrer action, according to the "HTTP_REFERER" header (Context.UrlReferrer).
protected RedirectToReferrer ( ) : void
리턴 void

RedirectToSiteRoot() 공개 메소드

Redirects to the site root directory (Context.ApplicationPath + "/").
public RedirectToSiteRoot ( ) : void
리턴 void

RenderEmailAndSend() 공개 메소드

Renders and delivers the e-mail message. DeliverEmail
public RenderEmailAndSend ( string templateName ) : void
templateName string
리턴 void

RenderMailMessage() 공개 메소드

Creates an instance of Message using the specified template for the body
public RenderMailMessage ( string templateName ) : Message
templateName string /// Name of the template to load. /// Will look in Views/mail for that template file. ///
리턴 Message

RenderMailMessage() 공개 메소드

Creates an instance of Message using the specified template for the body
public RenderMailMessage ( string templateName, bool doNotApplyLayout ) : Message
templateName string /// Name of the template to load. /// Will look in Views/mail for that template file. ///
doNotApplyLayout bool If true, it will skip the layout
리턴 Message

RenderSharedView() 공개 메소드

Specifies the shared view to be processed after the action has finished its processing. (A partial view shared by others views and usually in the root folder of the view directory).
public RenderSharedView ( string name ) : void
name string
리턴 void

RenderSharedView() 공개 메소드

Specifies the shared view to be processed after the action has finished its processing. (A partial view shared by others views and usually in the root folder of the view directory).
public RenderSharedView ( string name, bool skipLayout ) : void
name string
skipLayout bool
리턴 void

RenderText() 공개 메소드

Cancels the view processing and writes the specified contents to the browser
public RenderText ( IFormatProvider formatProvider, string contents ) : void
formatProvider IFormatProvider
contents string
리턴 void

RenderText() 공개 메소드

Cancels the view processing and writes the specified contents to the browser
public RenderText ( string contents ) : void
contents string
리턴 void

RenderView() 공개 메소드

Specifies the view to be processed after the action has finished its processing.
public RenderView ( string name ) : void
name string view template name (the file extension is optional)
리턴 void

RenderView() 공개 메소드

Specifies the view to be processed after the action has finished its processing.
public RenderView ( string name, bool skipLayout ) : void
name string view template name (the file extension is optional)
skipLayout bool If set to true, no layout will be used when rendering the view
리턴 void

RenderView() 공개 메소드

Specifies the view to be processed after the action has finished its processing.
public RenderView ( string name, bool skipLayout, string mimeType ) : void
name string view template name (the file extension is optional)
skipLayout bool If set to true, no layout will be used when rendering the view
mimeType string The mime type to use on the reply
리턴 void

RenderView() 공개 메소드

Specifies the view to be processed after the action has finished its processing.
public RenderView ( string controller, string name ) : void
controller string Controller name get view from (if you intend to user another controller's view
name string view template name (the file extension is optional)
리턴 void

RenderView() 공개 메소드

Specifies the view to be processed after the action has finished its processing.
public RenderView ( string controller, string name, bool skipLayout ) : void
controller string Controller name get view from (if you intend to user another controller's view
name string view template name (the file extension is optional)
skipLayout bool If set to true, no layout will be used when rendering the view
리턴 void

RenderView() 공개 메소드

Specifies the view to be processed after the action has finished its processing.
public RenderView ( string controller, string name, bool skipLayout, string mimeType ) : void
controller string Controller name get view from (if you intend to user another controller's view
name string view template name (the file extension is optional)
skipLayout bool If set to true, no layout will be used when rendering the view
mimeType string The mime type to use on the reply
리턴 void

RenderView() 공개 메소드

Specifies the view to be processed after the action has finished its processing.
public RenderView ( string controller, string name, string mimeType ) : void
controller string Controller name get view from (if you intend to user another controller's view
name string view template name (the file extension is optional)
mimeType string The mime type to use on the reply
리턴 void

SelectMethod() 보호된 메소드

Pendent
protected SelectMethod ( string action, IDictionary actions, IRequest request, IDictionary actionArgs ) : MethodInfo
action string
actions IDictionary
request IRequest
actionArgs IDictionary
리턴 System.Reflection.MethodInfo

Send() 공개 메소드

Performs the specified action, which means:
1. Define the default view name
2. Run the before filters
3. Select the method related to the action name and invoke it
4. On error, execute the rescues if available
5. Run the after filters
6. Invoke the view engine
public Send ( string action ) : void
action string Action name
리턴 void

Send() 공개 메소드

Performs the specified action with arguments.
public Send ( string action, IDictionary actionArgs ) : void
action string Action name
actionArgs IDictionary Action arguments
리턴 void

ToQueryString() 보호된 메소드

Creates a querystring string representation of the entries in the dictionary.
protected ToQueryString ( IDictionary parameters ) : string
parameters IDictionary The parameters.
리턴 string

ToQueryString() 보호된 메소드

Creates a querystring string representation of the namevalue collection.
protected ToQueryString ( NameValueCollection parameters ) : string
parameters System.Collections.Specialized.NameValueCollection The parameters.
리턴 string