aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Server.Implementations/HttpServer/SwaggerService.cs
diff options
context:
space:
mode:
authorEric Reed <ebr@mediabrowser3.com>2013-12-04 15:07:56 -0500
committerEric Reed <ebr@mediabrowser3.com>2013-12-04 15:07:56 -0500
commit6819be81601f6a95a60ce2735474ae0015d19bff (patch)
tree7e2743455e53d4a028fae789f2fc74a7c5ae87b9 /MediaBrowser.Server.Implementations/HttpServer/SwaggerService.cs
parent190be6311fbdf3a73f9c8e330f44edafe7764284 (diff)
parentcb882a4b48e9cf03cd363c54d93338ad62153e7e (diff)
Merge branch 'master' of https://github.com/MediaBrowser/MediaBrowser
Diffstat (limited to 'MediaBrowser.Server.Implementations/HttpServer/SwaggerService.cs')
-rw-r--r--MediaBrowser.Server.Implementations/HttpServer/SwaggerService.cs13
1 files changed, 10 insertions, 3 deletions
diff --git a/MediaBrowser.Server.Implementations/HttpServer/SwaggerService.cs b/MediaBrowser.Server.Implementations/HttpServer/SwaggerService.cs
index 20728a30c..904b6799b 100644
--- a/MediaBrowser.Server.Implementations/HttpServer/SwaggerService.cs
+++ b/MediaBrowser.Server.Implementations/HttpServer/SwaggerService.cs
@@ -1,6 +1,6 @@
-using MediaBrowser.Common.Net;
+using MediaBrowser.Common.Configuration;
+using MediaBrowser.Common.Net;
using ServiceStack.ServiceHost;
-using System.Diagnostics;
using System.IO;
namespace MediaBrowser.Server.Implementations.HttpServer
@@ -20,6 +20,13 @@ namespace MediaBrowser.Server.Implementations.HttpServer
public class SwaggerService : IHasResultFactory, IRestfulService
{
+ private readonly IApplicationPaths _appPaths;
+
+ public SwaggerService(IApplicationPaths appPaths)
+ {
+ _appPaths = appPaths;
+ }
+
/// <summary>
/// Gets the specified request.
/// </summary>
@@ -27,7 +34,7 @@ namespace MediaBrowser.Server.Implementations.HttpServer
/// <returns>System.Object.</returns>
public object Get(GetSwaggerResource request)
{
- var runningDirectory = Path.GetDirectoryName(Process.GetCurrentProcess().MainModule.FileName);
+ var runningDirectory = Path.GetDirectoryName(_appPaths.ApplicationPath);
var swaggerDirectory = Path.Combine(runningDirectory, "swagger-ui");