aboutsummaryrefslogtreecommitdiff
path: root/Emby.Server.Implementations/Services/ServiceController.cs
diff options
context:
space:
mode:
authorAndrew Rabert <6550543+nvllsvm@users.noreply.github.com>2019-01-19 15:11:50 -0500
committerGitHub <noreply@github.com>2019-01-19 15:11:50 -0500
commit55538764fa06a64795c099fc6496df9dbb4156bd (patch)
tree8c1f94861ecebdf634b70a7265945b6f8f13aff1 /Emby.Server.Implementations/Services/ServiceController.cs
parent3b52035ee064a5d9aa215d9515211d4508585d39 (diff)
parentc5430f86b0b5863482e7c4f7e55a79c7d88c133b (diff)
Merge pull request #575 from EraYaN/reformat
Reformat all C# server code to conform with code standards
Diffstat (limited to 'Emby.Server.Implementations/Services/ServiceController.cs')
-rw-r--r--Emby.Server.Implementations/Services/ServiceController.cs6
1 files changed, 2 insertions, 4 deletions
diff --git a/Emby.Server.Implementations/Services/ServiceController.cs b/Emby.Server.Implementations/Services/ServiceController.cs
index 46af83128..5796956d8 100644
--- a/Emby.Server.Implementations/Services/ServiceController.cs
+++ b/Emby.Server.Implementations/Services/ServiceController.cs
@@ -3,7 +3,6 @@ using System.Collections.Generic;
using System.Reflection;
using System.Threading.Tasks;
using Emby.Server.Implementations.HttpServer;
-using Microsoft.Extensions.Logging;
using MediaBrowser.Model.Services;
namespace Emby.Server.Implementations.Services
@@ -73,7 +72,7 @@ namespace Emby.Server.Implementations.Services
public void RegisterRestPaths(HttpListenerHost appHost, Type requestType, Type serviceType)
{
var attrs = appHost.GetRouteAttributes(requestType);
- foreach (RouteAttribute attr in attrs)
+ foreach (var attr in attrs)
{
var restPath = new RestPath(appHost.CreateInstance, appHost.GetParseFn, requestType, serviceType, attr.Path, attr.Verbs, attr.IsHidden, attr.Summary, attr.Description);
@@ -90,8 +89,7 @@ namespace Emby.Server.Implementations.Services
if (restPath.Path.IndexOfAny(InvalidRouteChars) != -1)
throw new ArgumentException(string.Format("Route '{0}' on '{1}' contains invalid chars. ", restPath.Path, restPath.RequestType.GetMethodName()));
- List<RestPath> pathsAtFirstMatch;
- if (!RestPathMap.TryGetValue(restPath.FirstMatchHashKey, out pathsAtFirstMatch))
+ if (!RestPathMap.TryGetValue(restPath.FirstMatchHashKey, out List<RestPath> pathsAtFirstMatch))
{
pathsAtFirstMatch = new List<RestPath>();
RestPathMap[restPath.FirstMatchHashKey] = pathsAtFirstMatch;