diff options
| author | Luke <luke.pulverenti@gmail.com> | 2017-08-13 16:21:10 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-08-13 16:21:10 -0400 |
| commit | dc578f3742b474bd85d556299a6b2763f4d9acda (patch) | |
| tree | cc4a8d1de140ece77160349e51a64857656ab373 /Emby.Server.Implementations/HttpServer/HttpListenerHost.cs | |
| parent | f6ed934a7e32bf10c3a141773d713bf3b19e784f (diff) | |
| parent | 7f200f057d33e3ef52b1b1b1bf1767577295317e (diff) | |
Merge pull request #2815 from MediaBrowser/beta
Beta
Diffstat (limited to 'Emby.Server.Implementations/HttpServer/HttpListenerHost.cs')
| -rw-r--r-- | Emby.Server.Implementations/HttpServer/HttpListenerHost.cs | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/Emby.Server.Implementations/HttpServer/HttpListenerHost.cs b/Emby.Server.Implementations/HttpServer/HttpListenerHost.cs index 05f78eba9..f150e4785 100644 --- a/Emby.Server.Implementations/HttpServer/HttpListenerHost.cs +++ b/Emby.Server.Implementations/HttpServer/HttpListenerHost.cs @@ -125,13 +125,6 @@ namespace Emby.Server.Implementations.HttpServer return _appHost.CreateInstance(type); } - private ServiceController CreateServiceController() - { - var types = _restServices.Select(r => r.GetType()).ToArray(); - - return new ServiceController(() => types); - } - /// <summary> /// Applies the request filters. Returns whether or not the request has been handled /// and no more processing should be done. @@ -186,7 +179,7 @@ namespace Emby.Server.Implementations.HttpServer attributes.Sort((x, y) => x.Priority - y.Priority); - return attributes.ToArray(); + return attributes.ToArray(attributes.Count); } /// <summary> @@ -697,11 +690,13 @@ namespace Emby.Server.Implementations.HttpServer { _restServices.AddRange(services); - ServiceController = CreateServiceController(); + ServiceController = new ServiceController(); _logger.Info("Calling ServiceStack AppHost.Init"); - ServiceController.Init(this); + var types = _restServices.Select(r => r.GetType()).ToArray(); + + ServiceController.Init(this, types); var requestFilters = _appHost.GetExports<IRequestFilter>().ToList(); foreach (var filter in requestFilters) @@ -741,7 +736,7 @@ namespace Emby.Server.Implementations.HttpServer }); } - return routes.ToArray(); + return routes.ToArray(routes.Count); } public Func<string, object> GetParseFn(Type propertyType) |
