C# Class Woopsa.RouteHandlerEmbeddedResources

Inheritance: IHTTPRouteHandler
显示文件 Open project: woopsa-protocol/Woopsa

Public Methods

Method Description
HandleRequest ( HTTPRequest request, HTTPResponse response ) : void
RouteHandlerEmbeddedResources ( string resourcePathInAssembly = "", Assembly assembly = null ) : System

Private Methods

Method Description
AssemblyByName ( string name ) : Assembly
FullResourceName ( Assembly assembly, string strippedResourceName ) : string
ResourcePath ( string urlPath ) : string
RespondResource ( HTTPResponse response, Assembly assembly, string subRoute ) : void
ServeEmbeddedResource ( HTTPResponse response, Assembly assembly, string strippedResourceName ) : bool

Method Details

HandleRequest() public method

public HandleRequest ( HTTPRequest request, HTTPResponse response ) : void
request HTTPRequest
response HTTPResponse
return void

RouteHandlerEmbeddedResources() public method

public RouteHandlerEmbeddedResources ( string resourcePathInAssembly = "", Assembly assembly = null ) : System
resourcePathInAssembly string /// The path where to find resources within the assembly. Empty string "" means the whole assembly. /// HTTP route should contain the remaining path from this origin path to the resource. ///
assembly System.Reflection.Assembly /// The assembly in which the resources are searched for. /// When assembly is null, the first part of the http route path is used as the assembly name. /// An assembly with that name is searched in all loaded assemblies. ///
return System