Skip to content

Commit

Permalink
Adding MiniProfiler
Browse files Browse the repository at this point in the history
  • Loading branch information
driis committed Dec 12, 2012
1 parent 66f387d commit 6b8e53c
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 2 deletions.
1 change: 1 addition & 0 deletions MobileVehicleInspection.Api/Global.asax
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<%@ Application Codebehind="Global.asax.cs" Inherits="MobileVehicleInspection.Api.Global" Language="C#" %>
20 changes: 20 additions & 0 deletions MobileVehicleInspection.Api/Global.asax.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
using System;
using ServiceStack.MiniProfiler;

namespace MobileVehicleInspection.Api
{
public class Global : System.Web.HttpApplication
{

protected void Application_BeginRequest(object sender, EventArgs e)
{
if (Request.IsLocal)
Profiler.Start();
}

protected void Application_End(object sender, EventArgs e)
{
Profiler.Stop();
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,13 @@
<Reference Include="System.EnterpriseServices" />
</ItemGroup>
<ItemGroup>
<Content Include="Global.asax" />
<Content Include="Web.config" />
</ItemGroup>
<ItemGroup>
<Compile Include="Global.asax.cs">
<DependentUpon>Global.asax</DependentUpon>
</Compile>
<Compile Include="Library\DanishTransportAuthorityResponseParser.cs" />
<Compile Include="Library\DanishTransportAuthorityScraper.cs" />
<Compile Include="Library\Guard.cs" />
Expand Down
4 changes: 2 additions & 2 deletions MobileVehicleInspection.Api/Services/ServiceStackAppHost.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
using System.Web;
using Funq;
using MobileVehicleInspection.Api.Library;
using ServiceStack.MiniProfiler;
using ServiceStack.Text;
using ServiceStack.WebHost.Endpoints;

Expand All @@ -17,8 +18,7 @@ public ServiceStackAppHost() : base("VehicleInspections", typeof(ServiceStackApp

public override void Configure(Container container)
{
JsConfig.EmitCamelCaseNames = true;

JsConfig.EmitCamelCaseNames = true;
container.Register(new ScraperSettings{
UrlTemplate = "http://selvbetjening.trafikstyrelsen.dk/Sider/resultater.aspx?{0}={1}"
});
Expand Down

0 comments on commit 6b8e53c

Please sign in to comment.