diff options
| author | Erwin de Haan <EraYaN@users.noreply.github.com> | 2019-01-13 21:46:33 +0100 |
|---|---|---|
| committer | Erwin de Haan <EraYaN@users.noreply.github.com> | 2019-01-13 21:46:33 +0100 |
| commit | e8674464373c3635243953cded42fcd2aa87d196 (patch) | |
| tree | 8087e1c5d47a525b04f3ae7e99183f68391bb410 /Emby.Server.Implementations/HttpServer/HttpResultFactory.cs | |
| parent | 65bd052f3e8682d177520af57db1c8ef5cb33262 (diff) | |
ReSharper format: conform inline 'out' parameters.
Diffstat (limited to 'Emby.Server.Implementations/HttpServer/HttpResultFactory.cs')
| -rw-r--r-- | Emby.Server.Implementations/HttpServer/HttpResultFactory.cs | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/Emby.Server.Implementations/HttpServer/HttpResultFactory.cs b/Emby.Server.Implementations/HttpServer/HttpResultFactory.cs index ce9dc9ad9..3cfa2bc75 100644 --- a/Emby.Server.Implementations/HttpServer/HttpResultFactory.cs +++ b/Emby.Server.Implementations/HttpServer/HttpResultFactory.cs @@ -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 var expires)) { responseHeaders["Expires"] = "-1"; } @@ -143,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 var expires)) { responseHeaders["Expires"] = "-1"; } @@ -188,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 var expires)) { responseHeaders["Expires"] = "-1"; } @@ -702,9 +699,7 @@ namespace Emby.Server.Implementations.HttpServer if (!string.IsNullOrEmpty(ifModifiedSinceHeader)) { - DateTime ifModifiedSince; - - if (DateTime.TryParse(ifModifiedSinceHeader, out ifModifiedSince)) + if (DateTime.TryParse(ifModifiedSinceHeader, out var ifModifiedSince)) { if (IsNotModified(ifModifiedSince.ToUniversalTime(), cacheDuration, lastDateModified)) { @@ -720,11 +715,9 @@ namespace Emby.Server.Implementations.HttpServer // Validate If-None-Match if ((hasCacheKey || !string.IsNullOrEmpty(ifNoneMatchHeader))) { - Guid ifNoneMatch; - ifNoneMatchHeader = (ifNoneMatchHeader ?? string.Empty).Trim('\"'); - if (Guid.TryParse(ifNoneMatchHeader, out ifNoneMatch)) + if (Guid.TryParse(ifNoneMatchHeader, out var ifNoneMatch)) { if (hasCacheKey && cacheKey.Equals(ifNoneMatch)) { |
