aboutsummaryrefslogtreecommitdiff
path: root/RSSDP/SsdpCommunicationsServer.cs
diff options
context:
space:
mode:
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 65ec0ca71..5ce3683eb 100644
--- a/RSSDP/SsdpCommunicationsServer.cs
+++ b/RSSDP/SsdpCommunicationsServer.cs
@@ -89,8 +89,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();
@@ -160,7 +160,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();
@@ -245,7 +245,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);