aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Model/Net
diff options
context:
space:
mode:
authorAnthony Lavado <anthony@lavado.ca>2020-02-12 02:01:56 -0500
committerGitHub <noreply@github.com>2020-02-12 02:01:56 -0500
commit42066ee326277fb181f609a8530cf419569efbf8 (patch)
tree4c119429d3689c03ed267880a4257cb6402c45ae /MediaBrowser.Model/Net
parent081d942d0361a4ad8aa918edcbb2f20c4c3f8471 (diff)
parent684568e6d2ef163c91fa5faf26600c16acf4b0b8 (diff)
Merge branch 'master' into transcoding-throttling
Diffstat (limited to 'MediaBrowser.Model/Net')
-rw-r--r--MediaBrowser.Model/Net/EndPointInfo.cs3
-rw-r--r--MediaBrowser.Model/Net/HttpException.cs2
-rw-r--r--MediaBrowser.Model/Net/ISocket.cs5
-rw-r--r--MediaBrowser.Model/Net/ISocketFactory.cs13
-rw-r--r--MediaBrowser.Model/Net/MimeTypes.cs14
-rw-r--r--MediaBrowser.Model/Net/NetworkShare.cs3
-rw-r--r--MediaBrowser.Model/Net/NetworkShareType.cs16
-rw-r--r--MediaBrowser.Model/Net/SocketReceiveResult.cs3
-rw-r--r--MediaBrowser.Model/Net/WebSocketMessage.cs6
9 files changed, 39 insertions, 26 deletions
diff --git a/MediaBrowser.Model/Net/EndPointInfo.cs b/MediaBrowser.Model/Net/EndPointInfo.cs
index b73799ea8..f5b5a406f 100644
--- a/MediaBrowser.Model/Net/EndPointInfo.cs
+++ b/MediaBrowser.Model/Net/EndPointInfo.cs
@@ -1,3 +1,6 @@
+#pragma warning disable CS1591
+#pragma warning disable SA1600
+
namespace MediaBrowser.Model.Net
{
public class EndPointInfo
diff --git a/MediaBrowser.Model/Net/HttpException.cs b/MediaBrowser.Model/Net/HttpException.cs
index 16253ed6c..4b15e30f0 100644
--- a/MediaBrowser.Model/Net/HttpException.cs
+++ b/MediaBrowser.Model/Net/HttpException.cs
@@ -4,7 +4,7 @@ using System.Net;
namespace MediaBrowser.Model.Net
{
/// <summary>
- /// Class HttpException
+ /// Class HttpException.
/// </summary>
public class HttpException : Exception
{
diff --git a/MediaBrowser.Model/Net/ISocket.cs b/MediaBrowser.Model/Net/ISocket.cs
index f80de5524..f7e4adb91 100644
--- a/MediaBrowser.Model/Net/ISocket.cs
+++ b/MediaBrowser.Model/Net/ISocket.cs
@@ -1,3 +1,6 @@
+#pragma warning disable CS1591
+#pragma warning disable SA1600
+
using System;
using System.Net;
using System.Threading;
@@ -14,8 +17,6 @@ namespace MediaBrowser.Model.Net
Task<SocketReceiveResult> ReceiveAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken);
- int Receive(byte[] buffer, int offset, int count);
-
IAsyncResult BeginReceive(byte[] buffer, int offset, int count, AsyncCallback callback);
SocketReceiveResult EndReceive(IAsyncResult result);
diff --git a/MediaBrowser.Model/Net/ISocketFactory.cs b/MediaBrowser.Model/Net/ISocketFactory.cs
index 2f857f1af..eb81af9a7 100644
--- a/MediaBrowser.Model/Net/ISocketFactory.cs
+++ b/MediaBrowser.Model/Net/ISocketFactory.cs
@@ -1,4 +1,6 @@
-using System.IO;
+#pragma warning disable CS1591
+#pragma warning disable SA1600
+
using System.Net;
namespace MediaBrowser.Model.Net
@@ -8,13 +10,6 @@ namespace MediaBrowser.Model.Net
/// </summary>
public interface ISocketFactory
{
- /// <summary>
- /// Creates a new unicast socket using the specified local port number.
- /// </summary>
- /// <param name="localPort">The local port to bind to.</param>
- /// <returns>A <see cref="ISocket"/> implementation.</returns>
- ISocket CreateUdpSocket(int localPort);
-
ISocket CreateUdpBroadcastSocket(int localPort);
/// <summary>
@@ -30,7 +25,5 @@ namespace MediaBrowser.Model.Net
/// <param name="localPort">The local port to bind to.</param>
/// <returns>A <see cref="ISocket"/> implementation.</returns>
ISocket CreateUdpMulticastSocket(string ipAddress, int multicastTimeToLive, int localPort);
-
- Stream CreateNetworkStream(ISocket socket, bool ownsSocket);
}
}
diff --git a/MediaBrowser.Model/Net/MimeTypes.cs b/MediaBrowser.Model/Net/MimeTypes.cs
index de5e58d22..d746b921f 100644
--- a/MediaBrowser.Model/Net/MimeTypes.cs
+++ b/MediaBrowser.Model/Net/MimeTypes.cs
@@ -1,8 +1,10 @@
+#pragma warning disable CS1591
+#pragma warning disable SA1600
+
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
-using MediaBrowser.Model.Extensions;
namespace MediaBrowser.Model.Net
{
@@ -165,20 +167,20 @@ namespace MediaBrowser.Model.Net
}
// Type text
- if (StringHelper.EqualsIgnoreCase(ext, ".html")
- || StringHelper.EqualsIgnoreCase(ext, ".htm"))
+ if (string.Equals(ext, ".html", StringComparison.OrdinalIgnoreCase)
+ || string.Equals(ext, ".htm", StringComparison.OrdinalIgnoreCase))
{
return "text/html; charset=UTF-8";
}
- if (StringHelper.EqualsIgnoreCase(ext, ".log")
- || StringHelper.EqualsIgnoreCase(ext, ".srt"))
+ if (string.Equals(ext, ".log", StringComparison.OrdinalIgnoreCase)
+ || string.Equals(ext, ".srt", StringComparison.OrdinalIgnoreCase))
{
return "text/plain";
}
// Misc
- if (StringHelper.EqualsIgnoreCase(ext, ".dll"))
+ if (string.Equals(ext, ".dll", StringComparison.OrdinalIgnoreCase))
{
return "application/octet-stream";
}
diff --git a/MediaBrowser.Model/Net/NetworkShare.cs b/MediaBrowser.Model/Net/NetworkShare.cs
index 1f61414fc..061e9982c 100644
--- a/MediaBrowser.Model/Net/NetworkShare.cs
+++ b/MediaBrowser.Model/Net/NetworkShare.cs
@@ -1,3 +1,6 @@
+#pragma warning disable CS1591
+#pragma warning disable SA1600
+
namespace MediaBrowser.Model.Net
{
public class NetworkShare
diff --git a/MediaBrowser.Model/Net/NetworkShareType.cs b/MediaBrowser.Model/Net/NetworkShareType.cs
index bf2d092a6..5d985f85d 100644
--- a/MediaBrowser.Model/Net/NetworkShareType.cs
+++ b/MediaBrowser.Model/Net/NetworkShareType.cs
@@ -1,28 +1,32 @@
namespace MediaBrowser.Model.Net
{
/// <summary>
- /// Enum NetworkShareType
+ /// Enum NetworkShareType.
/// </summary>
public enum NetworkShareType
{
/// <summary>
- /// Disk share
+ /// Disk share.
/// </summary>
Disk,
+
/// <summary>
- /// Printer share
+ /// Printer share.
/// </summary>
Printer,
+
/// <summary>
- /// Device share
+ /// Device share.
/// </summary>
Device,
+
/// <summary>
- /// IPC share
+ /// IPC share.
/// </summary>
Ipc,
+
/// <summary>
- /// Special share
+ /// Special share.
/// </summary>
Special
}
diff --git a/MediaBrowser.Model/Net/SocketReceiveResult.cs b/MediaBrowser.Model/Net/SocketReceiveResult.cs
index 3a4ad3738..a49e7e635 100644
--- a/MediaBrowser.Model/Net/SocketReceiveResult.cs
+++ b/MediaBrowser.Model/Net/SocketReceiveResult.cs
@@ -1,3 +1,6 @@
+#pragma warning disable CS1591
+#pragma warning disable SA1600
+
using System.Net;
namespace MediaBrowser.Model.Net
diff --git a/MediaBrowser.Model/Net/WebSocketMessage.cs b/MediaBrowser.Model/Net/WebSocketMessage.cs
index c763216f1..afa8cea92 100644
--- a/MediaBrowser.Model/Net/WebSocketMessage.cs
+++ b/MediaBrowser.Model/Net/WebSocketMessage.cs
@@ -1,7 +1,10 @@
+#pragma warning disable CS1591
+#pragma warning disable SA1600
+
namespace MediaBrowser.Model.Net
{
/// <summary>
- /// Class WebSocketMessage
+ /// Class WebSocketMessage.
/// </summary>
/// <typeparam name="T"></typeparam>
public class WebSocketMessage<T>
@@ -13,6 +16,7 @@ namespace MediaBrowser.Model.Net
public string MessageType { get; set; }
public string MessageId { get; set; }
public string ServerId { get; set; }
+
/// <summary>
/// Gets or sets the data.
/// </summary>