moved a few things for mono

This commit is contained in:
Luke Pulverenti
2013-09-24 20:54:51 -04:00
parent 0ab379e271
commit fe5a9232c8
36 changed files with 740 additions and 279 deletions

View File

@@ -0,0 +1,26 @@
using System.Net;
using System.Net.Cache;
using System.Net.Http;
namespace MediaBrowser.ServerApplication.Native
{
/// <summary>
/// Class HttpMessageHandlerFactory
/// </summary>
public static class HttpMessageHandlerFactory
{
/// <summary>
/// Gets the HTTP message handler.
/// </summary>
/// <param name="enableHttpCompression">if set to <c>true</c> [enable HTTP compression].</param>
/// <returns>HttpMessageHandler.</returns>
public static HttpMessageHandler GetHttpMessageHandler(bool enableHttpCompression)
{
return new WebRequestHandler
{
CachePolicy = new RequestCachePolicy(RequestCacheLevel.Revalidate),
AutomaticDecompression = enableHttpCompression ? DecompressionMethods.Deflate : DecompressionMethods.None
};
}
}
}