aboutsummaryrefslogtreecommitdiff
path: root/RSSDP/SsdpCommunicationsServer.cs
diff options
context:
space:
mode:
authorJoshua M. Boniface <joshua@boniface.me>2019-01-13 12:14:53 -0500
committerGitHub <noreply@github.com>2019-01-13 12:14:53 -0500
commit9dcaafe700b7130b49bafbadf0d47b37c6ecf53b (patch)
tree6ca1b2b3decac1a86b886dafd2645954a13601fd /RSSDP/SsdpCommunicationsServer.cs
parent17d8de4962ea9d78f6ddb557fe26465be1944b38 (diff)
parentb936c439321b55bf89c99dac96fc78cefe752e84 (diff)
Merge pull request #458 from EraYaN/code-cleanup
Clean up several minor issues and add TODOs
Diffstat (limited to 'RSSDP/SsdpCommunicationsServer.cs')
-rw-r--r--RSSDP/SsdpCommunicationsServer.cs8
1 files changed, 4 insertions, 4 deletions
diff --git a/RSSDP/SsdpCommunicationsServer.cs b/RSSDP/SsdpCommunicationsServer.cs
index e2e5c4e9f..5fc524428 100644
--- a/RSSDP/SsdpCommunicationsServer.cs
+++ b/RSSDP/SsdpCommunicationsServer.cs
@@ -86,8 +86,8 @@ namespace Rssdp.Infrastructure
/// <exception cref="System.ArgumentOutOfRangeException">The <paramref name="multicastTimeToLive"/> argument is less than or equal to zero.</exception>
public SsdpCommunicationsServer(ISocketFactory socketFactory, int localPort, int multicastTimeToLive, INetworkManager networkManager, ILogger logger, bool enableMultiSocketBinding)
{
- if (socketFactory == null) throw new ArgumentNullException("socketFactory");
- if (multicastTimeToLive <= 0) throw new ArgumentOutOfRangeException("multicastTimeToLive", "multicastTimeToLive must be greater than zero.");
+ if (socketFactory == null) throw new ArgumentNullException(nameof(socketFactory));
+ if (multicastTimeToLive <= 0) throw new ArgumentOutOfRangeException(nameof(multicastTimeToLive), "multicastTimeToLive must be greater than zero.");
_BroadcastListenSocketSynchroniser = new object();
_SendSocketSynchroniser = new object();
@@ -157,7 +157,7 @@ namespace Rssdp.Infrastructure
/// </summary>
public async Task SendMessage(byte[] messageData, IpEndPointInfo destination, IpAddressInfo fromLocalIpAddress, CancellationToken cancellationToken)
{
- if (messageData == null) throw new ArgumentNullException("messageData");
+ if (messageData == null) throw new ArgumentNullException(nameof(messageData));
ThrowIfDisposed();
@@ -242,7 +242,7 @@ namespace Rssdp.Infrastructure
/// </summary>
public async Task SendMulticastMessage(string message, int sendCount, CancellationToken cancellationToken)
{
- if (message == null) throw new ArgumentNullException("messageData");
+ if (message == null) throw new ArgumentNullException(nameof(message));
byte[] messageData = Encoding.UTF8.GetBytes(message);