C# Class Crowbar.CrowbarViewContext

Represents the context of a view (partial or non-partial) that should be rendered for form submission.
Afficher le fichier Open project: mrydengren/crowbar Class Usage Examples

Méthodes publiques

Méthode Description
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.

Private Methods

Méthode Description
GetBoolFromAppSettings ( string name, bool defaultValue ) : bool

Method Details

CrowbarViewContext() public méthode

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

FindViewEngineResult() public méthode

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.
Résultat System.Web.Mvc.ViewEngineResult

GetRouteData() public méthode

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

SetAnonymousPrincipal() public méthode

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

SetFormsAuthPrincipal() public méthode

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.
Résultat CrowbarViewContext