Walk by faith code, hack, curious

过滤器之一authorization

Technorati 标签:

public class ControllerContext

System.Web.Mvc 的成员

摘要: Encapsulates information about an HTTP request that matches specified System.Web.Routing.RouteBase and System.Web.Mvc.ControllerBase instances.

封装对应于指定sysytem,web.routing.routebase和system.web.mvc.controllerbase实例的http请求的信息,

public class ControllerContext
{
    // Fields
    private HttpContextBase _httpContext;
    private RequestContext _requestContext;
    private RouteData _routeData;
    [CompilerGenerated]
    private ControllerBase k__BackingField;
    internal const string PARENT_ACTION_VIEWCONTEXT = "ParentActionViewContext";

    // Methods
    public ControllerContext();
    protected ControllerContext(ControllerContext controllerContext);
    public ControllerContext(RequestContext requestContext, ControllerBase controller);
    public ControllerContext(HttpContextBase httpContext, RouteData routeData, ControllerBase controller);

    // Properties
    public virtual ControllerBase Controller { [CompilerGenerated] get; [CompilerGenerated] set; }
    public virtual HttpContextBase HttpContext { get; set; }
    public virtual bool IsChildAction { get; }
    public ViewContext ParentActionViewContext { get; }
    public RequestContext RequestContext { get; set; }
    public virtual RouteData RouteData { get; set; }
---------------------------------------------------------------------------

Gets or sets the URL route data.

Return Value

The URL route data.

===========================================================================
public virtual RouteData RouteData
{
    get
    {
        if (this._routeData == null)
        {
            this._routeData = (this._requestContext != null) ? this._requestContext.RouteData : new RouteData();
        }
        return this._routeData;
    }
    set
    {
        this._routeData = value;
    }
}

===========================================================================
    // Nested Types
    private sealed class EmptyHttpContext : HttpContextBase
    {
        // Methods
        public EmptyHttpContext();
    }
}

========================

AuthorizeAttribute 继承与ControllerContext

Encapsulates the information that is required for using an AuthorizeAttribute attribute.

封装信息,使用AuthorizeAttribute 属性的请求信息.