Class RouteHandlerBase
Defines a base implementation for a reuseable IHttpHandler and an IRouteHandler
Inheritance
System.Object
RouteHandlerBase
Implements
System.Web.IHttpHandler
System.Web.Routing.IRouteHandler
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: ImageVault.Common.Lib.Web
Assembly: ImageVault.Common.dll
Syntax
public abstract class RouteHandlerBase : HttpHandlerBase
Constructors
RouteHandlerBase(String)
Initializes a new instance of the RestHandler class.
Declaration
protected RouteHandlerBase(string path)
Parameters
Type | Name | Description |
---|---|---|
System.String | path |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | If |
System.ArgumentException | If the supplied path cannot start with any of the following characters: /,~ or if the path includes one of the following characters: ? |
Properties
HandlerPath
Gets the HandlerPath of the RouteHandlerBase
Declaration
protected string HandlerPath { get; }
Property Value
Type | Description |
---|---|
System.String | Will contain the name supplied to the constructor with a trailing / (if not already supplied) |
Methods
CreateRoute()
Creates a wildcard route that captures all routes for the requested path
Declaration
public RouteBase CreateRoute()
Returns
Type | Description |
---|---|
System.Web.Routing.RouteBase |
GetHandlerBaseUrl(String)
Gets the base url to the handler for the supplied url (including the trailing / for the handler)
Declaration
protected string GetHandlerBaseUrl(string url)
Parameters
Type | Name | Description |
---|---|---|
System.String | url |
Returns
Type | Description |
---|---|
System.String |
GetHttpHandler(RequestContext)
Declaration
public IHttpHandler GetHttpHandler(RequestContext requestContext)
Parameters
Type | Name | Description |
---|---|---|
System.Web.Routing.RequestContext | requestContext |
Returns
Type | Description |
---|---|
System.Web.IHttpHandler |
GetLocalPath(String)
Gets the local path relative to our handler
Declaration
protected string GetLocalPath(string url)
Parameters
Type | Name | Description |
---|---|---|
System.String | url |
Returns
Type | Description |
---|---|
System.String |
Implements
System.Web.IHttpHandler
System.Web.Routing.IRouteHandler