C# Class StackExchange.Profiling.UI.MiniProfilerHandler

Understands how to route and respond to MiniProfiler UI URLS.
Inheritance: IRouteHandler, IHttpHandler, IRequiresSessionState
Afficher le fichier Open project: NGPVAN/MiniProfiler Class Usage Examples

Méthodes publiques

Méthode Description
GetHttpHandler ( System.Web.Routing.RequestContext requestContext ) : IHttpHandler

Returns this MiniProfilerHandler to handle requestContext.

ProcessRequest ( HttpContext context ) : void

Returns either includes' css/javascript or results' html.

RegisterRoutes ( ) : void

Usually called internally, sometimes you may clear the routes during the apps lifecycle, if you do that call this to bring back mini profiler.

Private Methods

Méthode Description
AuthorizeRequest ( HttpContext context, bool isList, string &message ) : bool

authorize the request.

GetResource ( string filename ) : string

get the resource.

Includes ( HttpContext context, string path ) : string

Handles rendering static content files.

Index ( HttpContext context ) : string

the index (Landing) view.

NotFound ( HttpContext context, string contentType = "text/plain", string message = null ) : string

Helper method that sets a proper 404 response code.

RenderIncludes ( MiniProfiler profiler, RenderPosition position = null, bool showTrivial = null, bool showTimeWithChildren = null, int maxTracesToShow = null, bool showControls = null, bool startHidden = null ) : System.Web.HtmlString

Renders script tag found in "include.partial.html" - this is shared with all other language implementations, so if you change it, you MUST provide changes for those other implementations, e.g. ruby.

ResultList ( HttpContext context ) : string

The result list.

Results ( HttpContext context ) : string

Handles rendering a previous MiniProfiler session, identified by its "?id=GUID" on the query.

ResultsFullPage ( HttpContext context, MiniProfiler profiler ) : string

results full page.

ResultsJson ( HttpContext context, MiniProfiler profiler ) : string

set the JSON results and the content type.

Method Details

GetHttpHandler() public méthode

Returns this MiniProfilerHandler to handle requestContext.
public GetHttpHandler ( System.Web.Routing.RequestContext requestContext ) : IHttpHandler
requestContext System.Web.Routing.RequestContext /// The request Context. ///
Résultat IHttpHandler

ProcessRequest() public méthode

Returns either includes' css/javascript or results' html.
public ProcessRequest ( HttpContext context ) : void
context System.Web.HttpContext The http context.
Résultat void

RegisterRoutes() public static méthode

Usually called internally, sometimes you may clear the routes during the apps lifecycle, if you do that call this to bring back mini profiler.
public static RegisterRoutes ( ) : void
Résultat void