C# 클래스 Castle.MonoRail.Framework.Test.MockViewEngine

Represents a mock implementation of IViewEngine for unit test purposes.
상속: IViewEngine
파일 보기 프로젝트 열기: nats/castle-1.0.3-mono

공개 메소드들

메소드 설명
CreateJSGenerator ( IRailsEngineContext context ) : object

Implementors should return a generator instance if the view engine supports JS generation.

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

Processes the js generation view template - using the templateName to obtain the correct template, and using the context to output the result.

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

Processes the js generation view template - using the templateName to obtain the correct template, and using the specified TextWriter to output the result.

HasTemplate ( string templateName ) : bool

Evaluates whether the specified template exists.

MockViewEngine ( string viewFileExtension, string jsGeneratorFileExtension, bool supportsJSGeneration, bool xHtmlRendering ) : System

Initializes a new instance of the MockViewEngine class.

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

Processes the view - using the templateName to obtain the correct template, and using the context to output the result.

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 TextWriter. No layout is applied!

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

Should process the specified partial. The partial name must contains the path relative to the views folder.

메소드 상세

CreateJSGenerator() 공개 메소드

Implementors should return a generator instance if the view engine supports JS generation.
public CreateJSGenerator ( IRailsEngineContext context ) : object
context IRailsEngineContext The request context.
리턴 object

GenerateJS() 공개 메소드

Processes the js generation view template - using the templateName to obtain the correct template, and using the context to output the result.
public GenerateJS ( IRailsEngineContext context, Controller controller, string templateName ) : void
context IRailsEngineContext The request context.
controller Controller The controller.
templateName string Name of the template.
리턴 void

GenerateJS() 공개 메소드

Processes the js generation view template - using the templateName to obtain the correct template, and using the specified TextWriter to output the result.
public GenerateJS ( TextWriter output, IRailsEngineContext context, Controller controller, string templateName ) : void
output System.IO.TextWriter The output.
context IRailsEngineContext The request context.
controller Controller The controller.
templateName string Name of the template.
리턴 void

HasTemplate() 공개 메소드

Evaluates whether the specified template exists.
public HasTemplate ( string templateName ) : bool
templateName string
리턴 bool

MockViewEngine() 공개 메소드

Initializes a new instance of the MockViewEngine class.
public MockViewEngine ( string viewFileExtension, string jsGeneratorFileExtension, bool supportsJSGeneration, bool xHtmlRendering ) : System
viewFileExtension string The view file extension.
jsGeneratorFileExtension string The js generator file extension.
supportsJSGeneration bool if set to true [supports JS generation].
xHtmlRendering bool if set to true [x HTML rendering].
리턴 System

Process() 공개 메소드

Processes the view - using the templateName to obtain the correct template, and using the context to output the result.
public Process ( IRailsEngineContext context, Controller controller, string templateName ) : void
context IRailsEngineContext
controller Controller
templateName string
리턴 void

Process() 공개 메소드

Processes the view - using the templateName to obtain the correct template and writes the results to the TextWriter. No layout is applied!
public Process ( TextWriter output, IRailsEngineContext context, Controller controller, string templateName ) : void
output System.IO.TextWriter
context IRailsEngineContext
controller Controller
templateName string
리턴 void

ProcessContents() 공개 메소드

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 The request context.
controller Controller The controller.
contents string Content to output
리턴 void

ProcessPartial() 공개 메소드

Should process the specified partial. The partial name must contains the path relative to the views folder.
public ProcessPartial ( TextWriter output, IRailsEngineContext context, Controller controller, string partialName ) : void
output System.IO.TextWriter The output.
context IRailsEngineContext The request context.
controller Controller The controller.
partialName string The partial name.
리턴 void