aboutsummaryrefslogtreecommitdiff
path: root/Emby.Server.Implementations/Services
diff options
context:
space:
mode:
authorLuke <luke.pulverenti@gmail.com>2017-08-13 16:21:10 -0400
committerGitHub <noreply@github.com>2017-08-13 16:21:10 -0400
commitdc578f3742b474bd85d556299a6b2763f4d9acda (patch)
treecc4a8d1de140ece77160349e51a64857656ab373 /Emby.Server.Implementations/Services
parentf6ed934a7e32bf10c3a141773d713bf3b19e784f (diff)
parent7f200f057d33e3ef52b1b1b1bf1767577295317e (diff)
Merge pull request #2815 from MediaBrowser/beta
Beta
Diffstat (limited to 'Emby.Server.Implementations/Services')
-rw-r--r--Emby.Server.Implementations/Services/ServiceController.cs8
-rw-r--r--Emby.Server.Implementations/Services/ServiceExec.cs3
-rw-r--r--Emby.Server.Implementations/Services/ServicePath.cs11
3 files changed, 11 insertions, 11 deletions
diff --git a/Emby.Server.Implementations/Services/ServiceController.cs b/Emby.Server.Implementations/Services/ServiceController.cs
index 1c530144c..4ad56411a 100644
--- a/Emby.Server.Implementations/Services/ServiceController.cs
+++ b/Emby.Server.Implementations/Services/ServiceController.cs
@@ -15,17 +15,15 @@ namespace Emby.Server.Implementations.Services
public class ServiceController
{
public static ServiceController Instance;
- private readonly Func<IEnumerable<Type>> _resolveServicesFn;
- public ServiceController(Func<IEnumerable<Type>> resolveServicesFn)
+ public ServiceController()
{
Instance = this;
- _resolveServicesFn = resolveServicesFn;
}
- public void Init(HttpListenerHost appHost)
+ public void Init(HttpListenerHost appHost, Type[] serviceTypes)
{
- foreach (var serviceType in _resolveServicesFn())
+ foreach (var serviceType in serviceTypes)
{
RegisterService(appHost, serviceType);
}
diff --git a/Emby.Server.Implementations/Services/ServiceExec.cs b/Emby.Server.Implementations/Services/ServiceExec.cs
index e0b5e69c0..4a2199c89 100644
--- a/Emby.Server.Implementations/Services/ServiceExec.cs
+++ b/Emby.Server.Implementations/Services/ServiceExec.cs
@@ -5,6 +5,7 @@ using System.Linq.Expressions;
using System.Reflection;
using System.Threading.Tasks;
using MediaBrowser.Model.Services;
+using MediaBrowser.Model.Extensions;
namespace Emby.Server.Implementations.Services
{
@@ -123,7 +124,7 @@ namespace Emby.Server.Implementations.Services
}
if (reqFilters.Count > 0)
- actionCtx.RequestFilters = reqFilters.OrderBy(i => i.Priority).ToArray();
+ actionCtx.RequestFilters = reqFilters.OrderBy(i => i.Priority).ToArray(reqFilters.Count);
actions.Add(actionCtx);
}
diff --git a/Emby.Server.Implementations/Services/ServicePath.cs b/Emby.Server.Implementations/Services/ServicePath.cs
index 255b20919..da5e74f1f 100644
--- a/Emby.Server.Implementations/Services/ServicePath.cs
+++ b/Emby.Server.Implementations/Services/ServicePath.cs
@@ -5,6 +5,7 @@ using System.Linq;
using System.Reflection;
using System.Text;
using MediaBrowser.Model.Logging;
+using MediaBrowser.Model.Extensions;
namespace Emby.Server.Implementations.Services
{
@@ -142,13 +143,13 @@ namespace Emby.Server.Implementations.Services
}
}
- var components = componentsList.ToArray();
+ var components = componentsList.ToArray(componentsList.Count);
this.TotalComponentsCount = components.Length;
this.literalsToMatch = new string[this.TotalComponentsCount];
this.variablesNames = new string[this.TotalComponentsCount];
this.isWildcard = new bool[this.TotalComponentsCount];
- this.componentsWithSeparators = hasSeparators.ToArray();
+ this.componentsWithSeparators = hasSeparators.ToArray(hasSeparators.Count);
this.PathComponentsCount = this.componentsWithSeparators.Length;
string firstLiteralMatch = null;
@@ -268,7 +269,7 @@ namespace Emby.Server.Implementations.Services
propertyInfos.InsertRange(0, newPropertyInfos);
}
- return propertyInfos.ToArray();
+ return propertyInfos.ToArray(propertyInfos.Count);
}
return GetTypesPublicProperties(type)
@@ -285,7 +286,7 @@ namespace Emby.Server.Implementations.Services
if (mi != null && mi.IsStatic) continue;
pis.Add(pi);
}
- return pis.ToArray();
+ return pis.ToArray(pis.Count);
}
@@ -450,7 +451,7 @@ namespace Emby.Server.Implementations.Services
}
}
- withPathInfoParts = totalComponents.ToArray();
+ withPathInfoParts = totalComponents.ToArray(totalComponents.Count);
return true;
}