diff options
| author | LogicalPhallacy <44458166+LogicalPhallacy@users.noreply.github.com> | 2019-10-28 21:54:40 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-10-28 21:54:40 -0700 |
| commit | 8edb1c49d8d1835566bd30d8bf5460ab707b1ede (patch) | |
| tree | 03c6b38523efcc4f29691cea3cdc4def0e8d26d8 /MediaBrowser.Common/Net | |
| parent | 984e415c66cbd995d12ea95a3a9d3e2561ce4869 (diff) | |
| parent | c9f4a74af02e08b895cd6a8b8a408b1c0edfb6c4 (diff) | |
Merge pull request #6 from jellyfin/master
Bringing my branch up to sync
Diffstat (limited to 'MediaBrowser.Common/Net')
| -rw-r--r-- | MediaBrowser.Common/Net/CustomHeaderNames.cs | 4 | ||||
| -rw-r--r-- | MediaBrowser.Common/Net/HttpRequestOptions.cs | 14 | ||||
| -rw-r--r-- | MediaBrowser.Common/Net/HttpResponseInfo.cs | 3 | ||||
| -rw-r--r-- | MediaBrowser.Common/Net/IHttpClient.cs | 20 | ||||
| -rw-r--r-- | MediaBrowser.Common/Net/INetworkManager.cs | 6 |
5 files changed, 15 insertions, 32 deletions
diff --git a/MediaBrowser.Common/Net/CustomHeaderNames.cs b/MediaBrowser.Common/Net/CustomHeaderNames.cs index ff148dc801..5ca9897eb4 100644 --- a/MediaBrowser.Common/Net/CustomHeaderNames.cs +++ b/MediaBrowser.Common/Net/CustomHeaderNames.cs @@ -1,3 +1,5 @@ +#pragma warning disable CS1591 + namespace MediaBrowser.Common.Net { public static class CustomHeaderNames @@ -8,4 +10,4 @@ namespace MediaBrowser.Common.Net public const string XForwardedProto = "X-Forwarded-Proto"; public const string XRealIP = "X-Real-IP"; } -}
\ No newline at end of file +} diff --git a/MediaBrowser.Common/Net/HttpRequestOptions.cs b/MediaBrowser.Common/Net/HttpRequestOptions.cs index 76bd35e578..18c4b181f5 100644 --- a/MediaBrowser.Common/Net/HttpRequestOptions.cs +++ b/MediaBrowser.Common/Net/HttpRequestOptions.cs @@ -1,3 +1,5 @@ +#pragma warning disable CS1591 + using System; using System.Collections.Generic; using System.Threading; @@ -64,12 +66,6 @@ namespace MediaBrowser.Common.Net set => RequestHeaders[HeaderNames.Host] = value; } - /// <summary> - /// Gets or sets the progress. - /// </summary> - /// <value>The progress.</value> - public IProgress<double> Progress { get; set; } - public Dictionary<string, string> RequestHeaders { get; private set; } public string RequestContentType { get; set; } @@ -79,10 +75,6 @@ namespace MediaBrowser.Common.Net public bool BufferContent { get; set; } - public bool LogRequest { get; set; } - public bool LogRequestAsDebug { get; set; } - public bool LogErrors { get; set; } - public bool LogErrorResponseBody { get; set; } public bool EnableKeepAlive { get; set; } @@ -105,8 +97,6 @@ namespace MediaBrowser.Common.Net { RequestHeaders = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase); - LogRequest = true; - LogErrors = true; CacheMode = CacheMode.None; DecompressionMethod = CompressionMethod.Deflate; } diff --git a/MediaBrowser.Common/Net/HttpResponseInfo.cs b/MediaBrowser.Common/Net/HttpResponseInfo.cs index d65ce897ab..0de034b0ee 100644 --- a/MediaBrowser.Common/Net/HttpResponseInfo.cs +++ b/MediaBrowser.Common/Net/HttpResponseInfo.cs @@ -1,3 +1,5 @@ +#pragma warning disable CS1591 + using System; using System.IO; using System.Net; @@ -69,6 +71,7 @@ namespace MediaBrowser.Common.Net ContentHeaders = contentHeader; } + /// <inheritdoc /> public void Dispose() { // Only IDisposable for backwards compatibility diff --git a/MediaBrowser.Common/Net/IHttpClient.cs b/MediaBrowser.Common/Net/IHttpClient.cs index db69c6f2cd..23ba341738 100644 --- a/MediaBrowser.Common/Net/IHttpClient.cs +++ b/MediaBrowser.Common/Net/IHttpClient.cs @@ -1,3 +1,4 @@ +using System; using System.IO; using System.Threading.Tasks; using System.Net.Http; @@ -25,12 +26,13 @@ namespace MediaBrowser.Common.Net /// <summary> /// Warning: Deprecated function, - /// use 'Task<HttpResponseInfo> SendAsync(HttpRequestOptions options, HttpMethod httpMethod);' instead + /// use 'Task{HttpResponseInfo} SendAsync(HttpRequestOptions options, HttpMethod httpMethod);' instead /// Sends the asynchronous. /// </summary> /// <param name="options">The options.</param> /// <param name="httpMethod">The HTTP method.</param> /// <returns>Task{HttpResponseInfo}.</returns> + [Obsolete("Use 'Task{HttpResponseInfo} SendAsync(HttpRequestOptions options, HttpMethod httpMethod);' instead")] Task<HttpResponseInfo> SendAsync(HttpRequestOptions options, string httpMethod); /// <summary> @@ -47,21 +49,5 @@ namespace MediaBrowser.Common.Net /// <param name="options">The options.</param> /// <returns>Task{HttpResponseInfo}.</returns> Task<HttpResponseInfo> Post(HttpRequestOptions options); - - /// <summary> - /// Downloads the contents of a given url into a temporary location - /// </summary> - /// <param name="options">The options.</param> - /// <returns>Task{System.String}.</returns> - /// <exception cref="System.ArgumentNullException">progress</exception> - /// <exception cref="Model.Net.HttpException"></exception> - Task<string> GetTempFile(HttpRequestOptions options); - - /// <summary> - /// Gets the temporary file response. - /// </summary> - /// <param name="options">The options.</param> - /// <returns>Task{HttpResponseInfo}.</returns> - Task<HttpResponseInfo> GetTempFileResponse(HttpRequestOptions options); } } diff --git a/MediaBrowser.Common/Net/INetworkManager.cs b/MediaBrowser.Common/Net/INetworkManager.cs index 61f2bc2f9f..97504a471f 100644 --- a/MediaBrowser.Common/Net/INetworkManager.cs +++ b/MediaBrowser.Common/Net/INetworkManager.cs @@ -1,7 +1,9 @@ +#pragma warning disable CS1591 + using System; using System.Collections.Generic; using System.Net; -using System.Threading.Tasks; +using System.Net.NetworkInformation; using MediaBrowser.Model.IO; using MediaBrowser.Model.Net; @@ -25,7 +27,7 @@ namespace MediaBrowser.Common.Net /// Returns MAC Address from first Network Card in Computer /// </summary> /// <returns>[string] MAC Address</returns> - List<string> GetMacAddresses(); + List<PhysicalAddress> GetMacAddresses(); /// <summary> /// Determines whether [is in private address space] [the specified endpoint]. |
