Class HttpContextExtensions
Extension methods for the HttpContext class.
Inheritance
System.Object
HttpContextExtensions
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: EPiServer.Shell.Web
Assembly: EPiServer.Shell.dll
Version: 8.11.0Syntax
public static class HttpContextExtensions
Methods
GetControllerPath(HttpContext, Type, String)
Gets the path to a controller action
Declaration
public static string GetControllerPath(this HttpContext context, Type controllerType, string action)
Parameters
Type | Name | Description |
---|---|---|
System.Web.HttpContext | context | The current http context |
System.Type | controllerType | The type of controller to link |
System.String | action | The action name on the controller |
Returns
Type | Description |
---|---|
System.String |
GetControllerPath(HttpContextBase, Type, String)
Gets the path to a controller action
Declaration
public static string GetControllerPath(this HttpContextBase context, Type controllerType, string action)
Parameters
Type | Name | Description |
---|---|---|
System.Web.HttpContextBase | context | The current http context |
System.Type | controllerType | The type of controller to link |
System.String | action | The action name on the controller |
Returns
Type | Description |
---|---|
System.String |
GetHttpContextBase(HttpContext)
Returns the current http context base, or wraps the HttpContext.
Declaration
public static HttpContextBase GetHttpContextBase(this HttpContext context)
Parameters
Type | Name | Description |
---|---|---|
System.Web.HttpContext | context |
Returns
Type | Description |
---|---|
System.Web.HttpContextBase |
GetRequestContext(HttpContext)
Returns the current request context, or wraps the HttpContext and creates a new RequestContext.
Declaration
public static RequestContext GetRequestContext(this HttpContext context)
Parameters
Type | Name | Description |
---|---|---|
System.Web.HttpContext | context |
Returns
Type | Description |
---|---|
System.Web.Routing.RequestContext |