mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-04-22 10:04:44 +01:00
consolidate emby.server.core into emby.server.implementations
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -4,6 +4,7 @@ using System.Globalization;
|
||||
using System.Linq;
|
||||
using MediaBrowser.Model.Services;
|
||||
using SocketHttpListener.Net;
|
||||
using MediaBrowser.Model.Extensions;
|
||||
|
||||
namespace Emby.Server.Implementations.HttpServer
|
||||
{
|
||||
@@ -29,7 +30,7 @@ namespace Emby.Server.Implementations.HttpServer
|
||||
}
|
||||
else
|
||||
{
|
||||
var headerText = string.Join(", ", headers.Select(i => i.Name + "=" + i.Value).ToArray());
|
||||
var headerText = string.Join(", ", headers.Select(i => i.Name + "=" + i.Value).ToArray(headers.Count));
|
||||
|
||||
logger.Info("HTTP {0} {1}. {2}", method, url, headerText);
|
||||
}
|
||||
|
||||
@@ -3,6 +3,7 @@ using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using MediaBrowser.Model.Services;
|
||||
using MediaBrowser.Model.Extensions;
|
||||
|
||||
namespace Emby.Server.Implementations.HttpServer.SocketSharp
|
||||
{
|
||||
@@ -585,7 +586,7 @@ namespace Emby.Server.Implementations.HttpServer.SocketSharp
|
||||
WriteCharBytes(bytes, ch, e);
|
||||
}
|
||||
|
||||
byte[] buf = bytes.ToArray();
|
||||
byte[] buf = bytes.ToArray(bytes.Count);
|
||||
bytes = null;
|
||||
return e.GetString(buf, 0, buf.Length);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user