C# Class Castle.MonoRail.Framework.Views.Aspx.WebFormsViewEngine

Default implementation of a IViewEngine. Uses ASP.Net WebForms as views.
Inheritance: ViewEngineBase
Show file Open project: nats/castle-1.0.3-mono Class Usage Examples

Public Methods

Method Description
CreateJSGenerator ( IRailsEngineContext context ) : object

Creates the JS generator.

GenerateJS ( TextWriter output, IRailsEngineContext context, Controller controller, string templateName ) : void

Generates the JS.

HasTemplate ( String templateName ) : bool

Evaluates whether the specified template exists.

Process ( IRailsEngineContext context, Controller controller, String viewName ) : void

Obtains the aspx Page from the view name dispatch its execution using the standard ASP.Net API.

Process ( TextWriter output, IRailsEngineContext context, Controller controller, string templateName ) : void

Processes the view - using the templateName to obtain the correct template and writes the results to the System.IO.TextWriter.

ProcessContents ( IRailsEngineContext context, Controller controller, String contents ) : void

Wraps the specified content in the layout using the context to output the result.

ProcessPartial ( TextWriter output, IRailsEngineContext context, Controller controller, string partialName ) : void

Processes the partial.

WebFormsViewEngine ( ) : System

Initializes a new instance of the WebFormsViewEngine class.

Private Methods

Method Description
FinalizeView ( object sender, EventArgs e ) : void
GetCompiledPageInstance ( String viewName, HttpContext httpContext ) : IHttpHandler
GetCurrentController ( ) : Controller
HasLayout ( Controller controller ) : bool
IsTheSameView ( HttpContext httpContext, String viewName ) : bool
MapViewToPhysicalPath ( String viewName ) : String
MapViewToVirtualPath ( String viewName, string &physicalPath, HttpContext httpContext ) : String
ObtainMasterPage ( HttpContext httpContext, Controller controller ) : Page
PrepareLayout ( Controller controller, HttpContext httpContext ) : void
PrepareMasterPage ( object sender, EventArgs e ) : void
PrepareView ( object sender, EventArgs e ) : void
ProcessExecuteView ( IRailsEngineContext context, Controller controller, String viewName ) : void
ProcessInlineView ( Controller controller, String viewName, HttpContext httpContext ) : void
ProcessLayoutIfNeeded ( Controller controller, HttpContext httpContext, IHttpHandler childPage ) : bool
ProcessPage ( Controller controller, IHttpHandler page, HttpContext httpContext ) : void
ProcessPropertyBag ( IDictionary bag, IHttpHandler handler ) : void
RestoreFilter ( HttpResponse response ) : byte[]
SetPropertyValue ( IHttpHandler handler, object key, object value ) : void
StartFiltering ( HttpResponse response ) : void

Method Details

CreateJSGenerator() public method

Creates the JS generator.
public CreateJSGenerator ( IRailsEngineContext context ) : object
context IRailsEngineContext The context.
return object

GenerateJS() public method

Generates the JS.
public GenerateJS ( TextWriter output, IRailsEngineContext context, Controller controller, string templateName ) : void
output System.IO.TextWriter The output.
context IRailsEngineContext The context.
controller Controller The controller.
templateName string Name of the template.
return void

HasTemplate() public method

Evaluates whether the specified template exists.
public HasTemplate ( String templateName ) : bool
templateName String
return bool

Process() public method

Obtains the aspx Page from the view name dispatch its execution using the standard ASP.Net API.
public Process ( IRailsEngineContext context, Controller controller, String viewName ) : void
context IRailsEngineContext
controller Controller
viewName String
return void

Process() public method

Processes the view - using the templateName to obtain the correct template and writes the results to the System.IO.TextWriter.
public Process ( TextWriter output, IRailsEngineContext context, Controller controller, string templateName ) : void
output System.IO.TextWriter
context IRailsEngineContext
controller Controller
templateName string
return void

ProcessContents() public method

Wraps the specified content in the layout using the context to output the result.
public ProcessContents ( IRailsEngineContext context, Controller controller, String contents ) : void
context IRailsEngineContext
controller Controller
contents String
return void

ProcessPartial() public method

Processes the partial.
public ProcessPartial ( TextWriter output, IRailsEngineContext context, Controller controller, string partialName ) : void
output System.IO.TextWriter The output.
context IRailsEngineContext The context.
controller Controller The controller.
partialName string The partial name.
return void

WebFormsViewEngine() public method

Initializes a new instance of the WebFormsViewEngine class.
public WebFormsViewEngine ( ) : System
return System