aboutsummaryrefslogtreecommitdiff
path: root/Emby.Server.Implementations/Services/ServiceHandler.cs
diff options
context:
space:
mode:
authorAndrew Rabert <6550543+nvllsvm@users.noreply.github.com>2019-01-22 18:13:47 -0500
committerGitHub <noreply@github.com>2019-01-22 18:13:47 -0500
commit28483bdb54be96ae83e0fded097f534d7e26ba1e (patch)
treee7f4b92326417ebf55eecdf68a01d2c3b9e660d7 /Emby.Server.Implementations/Services/ServiceHandler.cs
parent920c39454c05e979eabe81877269cd4517a03ccf (diff)
parent8106c8393b711a7e1d40487e3caf2b014decbe28 (diff)
Merge pull request #651 from jellyfin/release-10.1.0
Release 10.1.0
Diffstat (limited to 'Emby.Server.Implementations/Services/ServiceHandler.cs')
-rw-r--r--Emby.Server.Implementations/Services/ServiceHandler.cs13
1 files changed, 5 insertions, 8 deletions
diff --git a/Emby.Server.Implementations/Services/ServiceHandler.cs b/Emby.Server.Implementations/Services/ServiceHandler.cs
index f5fcb5fe6..7e836e22c 100644
--- a/Emby.Server.Implementations/Services/ServiceHandler.cs
+++ b/Emby.Server.Implementations/Services/ServiceHandler.cs
@@ -4,8 +4,8 @@ using System.Reflection;
using System.Threading;
using System.Threading.Tasks;
using Emby.Server.Implementations.HttpServer;
-using Microsoft.Extensions.Logging;
using MediaBrowser.Model.Services;
+using Microsoft.Extensions.Logging;
namespace Emby.Server.Implementations.Services
{
@@ -21,7 +21,7 @@ namespace Emby.Server.Implementations.Services
return deserializer(requestType, httpReq.InputStream);
}
}
- return Task.FromResult(host.CreateInstance(requestType));
+ return Task.FromResult(host.CreateInstance(requestType));
}
public static RestPath FindMatchingRestPath(string httpMethod, string pathInfo, out string contentType)
@@ -62,8 +62,7 @@ namespace Emby.Server.Implementations.Services
{
if (this.RestPath == null)
{
- string contentType;
- this.RestPath = FindMatchingRestPath(httpMethod, pathInfo, out contentType);
+ this.RestPath = FindMatchingRestPath(httpMethod, pathInfo, out string contentType);
if (contentType != null)
ResponseContentType = contentType;
@@ -137,9 +136,8 @@ namespace Emby.Server.Implementations.Services
public static object CreateRequest(IRequest httpReq, RestPath restPath, Dictionary<string, string> requestParams, object requestDto)
{
- string contentType;
var pathInfo = !restPath.IsWildCardPath
- ? GetSanitizedPathInfo(httpReq.PathInfo, out contentType)
+ ? GetSanitizedPathInfo(httpReq.PathInfo, out string contentType)
: httpReq.PathInfo;
return restPath.CreateRequest(pathInfo, requestParams, requestDto);
@@ -239,8 +237,7 @@ namespace Emby.Server.Implementations.Services
private static RestPath GetRoute(IRequest req)
{
- object route;
- req.Items.TryGetValue("__route", out route);
+ req.Items.TryGetValue("__route", out var route);
return route as RestPath;
}
}