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

Represents a mock implementation of IMockViewComponentContext for unit test purposes.
상속: IMockViewComponentContext
파일 보기 프로젝트 열기: nats/castle-1.0.3-mono 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
OnBodyRender TestSectionRender
OnViewRender TestViewRender

공개 메소드들

메소드 설명
HasSection ( string sectionName ) : bool

Determines whether the current component declaration on the view has the specified section.

MockViewComponentContext ( string componentName, TextWriter writer, IViewEngine viewEngine ) : System

Initializes a new instance of the MockViewComponentContext class.

RenderBody ( ) : void

Renders the component body.

RenderBody ( TextWriter writer ) : void

Renders the body into the specified TextWriter

RenderSection ( string sectionName ) : void

Renders the the specified section. No exception will the throw if the section cannot be found.

RenderSection ( string sectionName, TextWriter writer ) : void

Renders the the specified section. No exception will the throw if the section cannot be found.

RenderView ( string name, TextWriter writer ) : void

Renders the view specified to the writer.

보호된 메소드들

메소드 설명
MockViewComponentContext ( ) : System

Initializes a new instance of the MockViewComponentContext class.

메소드 상세

HasSection() 공개 메소드

Determines whether the current component declaration on the view has the specified section.
public HasSection ( string sectionName ) : bool
sectionName string Name of the section.
리턴 bool

MockViewComponentContext() 보호된 메소드

Initializes a new instance of the MockViewComponentContext class.
protected MockViewComponentContext ( ) : System
리턴 System

MockViewComponentContext() 공개 메소드

Initializes a new instance of the MockViewComponentContext class.
public MockViewComponentContext ( string componentName, TextWriter writer, IViewEngine viewEngine ) : System
componentName string Name of the component.
writer System.IO.TextWriter The writer.
viewEngine IViewEngine The view engine.
리턴 System

RenderBody() 공개 메소드

Renders the component body.
public RenderBody ( ) : void
리턴 void

RenderBody() 공개 메소드

Renders the body into the specified TextWriter
public RenderBody ( TextWriter writer ) : void
writer System.IO.TextWriter The writer.
리턴 void

RenderSection() 공개 메소드

Renders the the specified section. No exception will the throw if the section cannot be found.
public RenderSection ( string sectionName ) : void
sectionName string Name of the section.
리턴 void

RenderSection() 공개 메소드

Renders the the specified section. No exception will the throw if the section cannot be found.
public RenderSection ( string sectionName, TextWriter writer ) : void
sectionName string Name of the section.
writer System.IO.TextWriter The writer to output the section content.
리턴 void

RenderView() 공개 메소드

Renders the view specified to the writer.
public RenderView ( string name, TextWriter writer ) : void
name string The view template name
writer System.IO.TextWriter A writer to output
리턴 void

프로퍼티 상세

OnBodyRender 공개적으로 프로퍼티

Event that is raised when a section is rendered by the viewcomponent.
public TestSectionRender OnBodyRender
리턴 TestSectionRender

OnViewRender 공개적으로 프로퍼티

Event that is raised when a view is rendered by the viewcomponent.
public TestViewRender OnViewRender
리턴 TestViewRender