C# Class StackExchange.Profiling.MiniProfilerMessageHandler

Extension to HttpClientHandler to provide profiling across WebAPI web requests.
Inheritance: System.Net.Http.HttpClientHandler
Show file Open project: JSkimming/MiniProfiler.WebAPI

Public Methods

Method Description
MiniProfilerMessageHandler ( StackExchange.Profiling.MiniProfiler profiler = null, bool addStep = true, string stepPrefix = "WebAPI :" ) : System

Constructs the MiniProfilerMessageHandler.

Protected Methods

Method Description
SendAsync ( HttpRequestMessage request, CancellationToken cancellationToken ) : Task

Adds profiling to the request.

Private Methods

Method Description
AddRemoteProfilerResults ( HttpResponseMessage response, StackExchange.Profiling.MiniProfiler profiler, decimal newStartMilliseconds ) : HttpResponseMessage

Adds the profiling results fro the response to the supplied profiler.

Method Details

MiniProfilerMessageHandler() public method

Constructs the MiniProfilerMessageHandler.
public MiniProfilerMessageHandler ( StackExchange.Profiling.MiniProfiler profiler = null, bool addStep = true, string stepPrefix = "WebAPI :" ) : System
profiler StackExchange.Profiling.MiniProfiler The profiler, if null the profiler is used.
addStep bool If true a is added for the request.
stepPrefix string The prefix for the name, used if is true.
return System

SendAsync() protected method

Adds profiling to the request.
The was null.
protected SendAsync ( HttpRequestMessage request, CancellationToken cancellationToken ) : Task
request System.Net.Http.HttpRequestMessage The HTTP request message.
cancellationToken System.Threading.CancellationToken A cancellation token to cancel the operation.
return Task