C# 클래스 Crowbar.CrowbarViewContext

Represents the context of a view (partial or non-partial) that should be rendered for form submission.
파일 보기 프로젝트 열기: mrydengren/crowbar 1 사용 예제들

공개 메소드들

메소드 설명
CrowbarViewContext ( string viewName ) : System

Creates a new instance of CrowbarViewContext.

FindViewEngineResult ( System.Web.Mvc.ControllerContext controllerContext ) : System.Web.Mvc.ViewEngineResult

Finds a view based on the specified view name.

GetRouteData ( ) : System.Web.Routing.RouteData

Gets the route data that will be used by the request context.

SetAnonymousPrincipal ( ) : CrowbarViewContext

Sets the security principal to an anonymous user (no username), using a generic identity.

SetFormsAuthPrincipal ( string username, int timeout = 30 ) : CrowbarViewContext

Sets the security principal, using forms identity, in which the view should be rendered.

비공개 메소드들

메소드 설명
GetBoolFromAppSettings ( string name, bool defaultValue ) : bool

메소드 상세

CrowbarViewContext() 공개 메소드

Creates a new instance of CrowbarViewContext.
public CrowbarViewContext ( string viewName ) : System
viewName string The name of the view that should be rendered.
리턴 System

FindViewEngineResult() 공개 메소드

Finds a view based on the specified view name.
public FindViewEngineResult ( System.Web.Mvc.ControllerContext controllerContext ) : System.Web.Mvc.ViewEngineResult
controllerContext System.Web.Mvc.ControllerContext The controller context.
리턴 System.Web.Mvc.ViewEngineResult

GetRouteData() 공개 메소드

Gets the route data that will be used by the request context.
public GetRouteData ( ) : System.Web.Routing.RouteData
리턴 System.Web.Routing.RouteData

SetAnonymousPrincipal() 공개 메소드

Sets the security principal to an anonymous user (no username), using a generic identity.
public SetAnonymousPrincipal ( ) : CrowbarViewContext
리턴 CrowbarViewContext

SetFormsAuthPrincipal() 공개 메소드

Sets the security principal, using forms identity, in which the view should be rendered.
public SetFormsAuthPrincipal ( string username, int timeout = 30 ) : CrowbarViewContext
username string The username.
timeout int The time, in minutes, for which the forms authentication cookie is valid.
리턴 CrowbarViewContext