diff options
| author | Luke Pulverenti <luke.pulverenti@gmail.com> | 2017-02-12 21:06:54 -0500 |
|---|---|---|
| committer | Luke Pulverenti <luke.pulverenti@gmail.com> | 2017-02-12 21:06:54 -0500 |
| commit | e1b2b2e77e03c2f858c06fdeabb2da16f719d921 (patch) | |
| tree | c4359f6985fde58df60091777018257fbfed87e8 /Emby.Server.Implementations/Services/RequestHelper.cs | |
| parent | 511a8702c29445288251fcf841c394e837db19cc (diff) | |
removed dead code
Diffstat (limited to 'Emby.Server.Implementations/Services/RequestHelper.cs')
| -rw-r--r-- | Emby.Server.Implementations/Services/RequestHelper.cs | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/Emby.Server.Implementations/Services/RequestHelper.cs b/Emby.Server.Implementations/Services/RequestHelper.cs index 8cfc3d089..7538d3102 100644 --- a/Emby.Server.Implementations/Services/RequestHelper.cs +++ b/Emby.Server.Implementations/Services/RequestHelper.cs @@ -1,40 +1,40 @@ using System; using System.IO; -using ServiceStack; +using Emby.Server.Implementations.HttpServer; namespace Emby.Server.Implementations.Services { public class RequestHelper { - public static Func<Type, Stream, object> GetRequestReader(string contentType) + public static Func<Type, Stream, object> GetRequestReader(HttpListenerHost host, string contentType) { switch (GetContentTypeWithoutEncoding(contentType)) { case "application/xml": case "text/xml": case "text/xml; charset=utf-8": //"text/xml; charset=utf-8" also matches xml - return ServiceStackHost.Instance.DeserializeXml; + return host.DeserializeXml; case "application/json": case "text/json": - return ServiceStackHost.Instance.DeserializeJson; + return host.DeserializeJson; } return null; } - public static Action<object, Stream> GetResponseWriter(string contentType) + public static Action<object, Stream> GetResponseWriter(HttpListenerHost host, string contentType) { switch (GetContentTypeWithoutEncoding(contentType)) { case "application/xml": case "text/xml": case "text/xml; charset=utf-8": //"text/xml; charset=utf-8" also matches xml - return (o, s) => ServiceStackHost.Instance.SerializeToXml(o, s); + return host.SerializeToXml; case "application/json": case "text/json": - return (o, s) => ServiceStackHost.Instance.SerializeToJson(o, s); + return host.SerializeToJson; } return null; |
