aboutsummaryrefslogtreecommitdiff
path: root/Emby.Server.Implementations/HttpServer/HttpResultFactory.cs
diff options
context:
space:
mode:
authorAndrew Rabert <6550543+nvllsvm@users.noreply.github.com>2019-01-19 15:11:50 -0500
committerGitHub <noreply@github.com>2019-01-19 15:11:50 -0500
commit55538764fa06a64795c099fc6496df9dbb4156bd (patch)
tree8c1f94861ecebdf634b70a7265945b6f8f13aff1 /Emby.Server.Implementations/HttpServer/HttpResultFactory.cs
parent3b52035ee064a5d9aa215d9515211d4508585d39 (diff)
parentc5430f86b0b5863482e7c4f7e55a79c7d88c133b (diff)
Merge pull request #575 from EraYaN/reformat
Reformat all C# server code to conform with code standards
Diffstat (limited to 'Emby.Server.Implementations/HttpServer/HttpResultFactory.cs')
-rw-r--r--Emby.Server.Implementations/HttpServer/HttpResultFactory.cs22
1 files changed, 10 insertions, 12 deletions
diff --git a/Emby.Server.Implementations/HttpServer/HttpResultFactory.cs b/Emby.Server.Implementations/HttpServer/HttpResultFactory.cs
index bacf5556f..8b60d61d4 100644
--- a/Emby.Server.Implementations/HttpServer/HttpResultFactory.cs
+++ b/Emby.Server.Implementations/HttpServer/HttpResultFactory.cs
@@ -1,7 +1,3 @@
-using MediaBrowser.Common.Extensions;
-using MediaBrowser.Controller.Net;
-using Microsoft.Extensions.Logging;
-using MediaBrowser.Model.Serialization;
using System;
using System.Collections.Generic;
using System.Globalization;
@@ -13,8 +9,12 @@ using System.Text;
using System.Threading.Tasks;
using System.Xml;
using Emby.Server.Implementations.Services;
+using MediaBrowser.Common.Extensions;
+using MediaBrowser.Controller.Net;
using MediaBrowser.Model.IO;
+using MediaBrowser.Model.Serialization;
using MediaBrowser.Model.Services;
+using Microsoft.Extensions.Logging;
using IRequest = MediaBrowser.Model.Services.IRequest;
using MimeTypes = MediaBrowser.Model.Net.MimeTypes;
@@ -96,8 +96,7 @@ namespace Emby.Server.Implementations.HttpServer
responseHeaders = new Dictionary<string, string>();
}
- string expires;
- if (addCachePrevention && !responseHeaders.TryGetValue("Expires", out expires))
+ if (addCachePrevention && !responseHeaders.TryGetValue("Expires", out string expires))
{
responseHeaders["Expires"] = "-1";
}
@@ -115,7 +114,8 @@ namespace Emby.Server.Implementations.HttpServer
string compressionType = null;
bool isHeadRequest = false;
- if (requestContext != null) {
+ if (requestContext != null)
+ {
compressionType = GetCompressionType(requestContext, content, contentType);
isHeadRequest = string.Equals(requestContext.Verb, "head", StringComparison.OrdinalIgnoreCase);
}
@@ -142,8 +142,7 @@ namespace Emby.Server.Implementations.HttpServer
responseHeaders = new Dictionary<string, string>();
}
- string expires;
- if (addCachePrevention && !responseHeaders.TryGetValue("Expires", out expires))
+ if (addCachePrevention && !responseHeaders.TryGetValue("Expires", out string expires))
{
responseHeaders["Expires"] = "-1";
}
@@ -187,8 +186,7 @@ namespace Emby.Server.Implementations.HttpServer
responseHeaders = new Dictionary<string, string>();
}
- string expires;
- if (addCachePrevention && !responseHeaders.TryGetValue("Expires", out expires))
+ if (addCachePrevention && !responseHeaders.TryGetValue("Expires", out string expires))
{
responseHeaders["Expires"] = "-1";
}
@@ -716,7 +714,7 @@ namespace Emby.Server.Implementations.HttpServer
{
ifNoneMatchHeader = (ifNoneMatchHeader ?? string.Empty).Trim('\"');
- if (Guid.TryParse(ifNoneMatchHeader, out Guid ifNoneMatch)
+ if (Guid.TryParse(ifNoneMatchHeader, out var ifNoneMatch)
&& cacheKey.Equals(ifNoneMatch))
{
return true;