diff options
| author | Andrew Rabert <6550543+nvllsvm@users.noreply.github.com> | 2019-01-19 15:11:50 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-01-19 15:11:50 -0500 |
| commit | 55538764fa06a64795c099fc6496df9dbb4156bd (patch) | |
| tree | 8c1f94861ecebdf634b70a7265945b6f8f13aff1 /SocketHttpListener/HttpResponse.cs | |
| parent | 3b52035ee064a5d9aa215d9515211d4508585d39 (diff) | |
| parent | c5430f86b0b5863482e7c4f7e55a79c7d88c133b (diff) | |
Merge pull request #575 from EraYaN/reformat
Reformat all C# server code to conform with code standards
Diffstat (limited to 'SocketHttpListener/HttpResponse.cs')
| -rw-r--r-- | SocketHttpListener/HttpResponse.cs | 48 |
1 files changed, 8 insertions, 40 deletions
diff --git a/SocketHttpListener/HttpResponse.cs b/SocketHttpListener/HttpResponse.cs index 535fde031..bcfa4a906 100644 --- a/SocketHttpListener/HttpResponse.cs +++ b/SocketHttpListener/HttpResponse.cs @@ -1,13 +1,11 @@ using System; -using System.Collections.Specialized; -using System.IO; +using System.Linq; using System.Net; using System.Text; -using HttpStatusCode = SocketHttpListener.Net.HttpStatusCode; -using HttpVersion = SocketHttpListener.Net.HttpVersion; -using System.Linq; using MediaBrowser.Model.Services; using SocketHttpListener.Net; +using HttpStatusCode = SocketHttpListener.Net.HttpStatusCode; +using HttpVersion = SocketHttpListener.Net.HttpVersion; namespace SocketHttpListener { @@ -48,13 +46,7 @@ namespace SocketHttpListener #region Public Properties - public CookieCollection Cookies - { - get - { - return GetCookies(Headers, true); - } - } + public CookieCollection Cookies => GetCookies(Headers, true); private static CookieCollection GetCookies(QueryParamCollection headers, bool response) { @@ -64,21 +56,9 @@ namespace SocketHttpListener : CookieHelper.Parse(headers[name], response); } - public bool IsProxyAuthenticationRequired - { - get - { - return _code == "407"; - } - } + public bool IsProxyAuthenticationRequired => _code == "407"; - public bool IsUnauthorized - { - get - { - return _code == "401"; - } - } + public bool IsUnauthorized => _code == "401"; public bool IsWebSocketResponse { @@ -92,21 +72,9 @@ namespace SocketHttpListener } } - public string Reason - { - get - { - return _reason; - } - } + public string Reason => _reason; - public string StatusCode - { - get - { - return _code; - } - } + public string StatusCode => _code; #endregion |
