diff options
Diffstat (limited to 'RSSDP/SsdpDevicePublisher.cs')
| -rw-r--r-- | RSSDP/SsdpDevicePublisher.cs | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/RSSDP/SsdpDevicePublisher.cs b/RSSDP/SsdpDevicePublisher.cs index cee9b7f91..11aaf4641 100644 --- a/RSSDP/SsdpDevicePublisher.cs +++ b/RSSDP/SsdpDevicePublisher.cs @@ -41,11 +41,11 @@ namespace Rssdp.Infrastructure /// </summary> public SsdpDevicePublisher(ISsdpCommunicationsServer communicationsServer, ITimerFactory timerFactory, string osName, string osVersion) { - if (communicationsServer == null) throw new ArgumentNullException("communicationsServer"); - if (osName == null) throw new ArgumentNullException("osName"); - if (osName.Length == 0) throw new ArgumentException("osName cannot be an empty string.", "osName"); - if (osVersion == null) throw new ArgumentNullException("osVersion"); - if (osVersion.Length == 0) throw new ArgumentException("osVersion cannot be an empty string.", "osName"); + if (communicationsServer == null) throw new ArgumentNullException(nameof(communicationsServer)); + if (osName == null) throw new ArgumentNullException(nameof(osName)); + if (osName.Length == 0) throw new ArgumentException("osName cannot be an empty string.", nameof(osName)); + if (osVersion == null) throw new ArgumentNullException(nameof(osVersion)); + if (osVersion.Length == 0) throw new ArgumentException("osVersion cannot be an empty string.", nameof(osName)); _SupportPnpRootDevice = true; _timerFactory = timerFactory; @@ -81,7 +81,7 @@ namespace Rssdp.Infrastructure [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1804:RemoveUnusedLocals", MessageId = "t", Justification = "Capture task to local variable supresses compiler warning, but task is not really needed.")] public void AddDevice(SsdpRootDevice device) { - if (device == null) throw new ArgumentNullException("device"); + if (device == null) throw new ArgumentNullException(nameof(device)); ThrowIfDisposed(); @@ -116,7 +116,7 @@ namespace Rssdp.Infrastructure /// <exception cref="System.ArgumentNullException">Thrown if the <paramref name="device"/> argument is null.</exception> public async Task RemoveDevice(SsdpRootDevice device) { - if (device == null) throw new ArgumentNullException("device"); + if (device == null) throw new ArgumentNullException(nameof(device)); bool wasRemoved = false; TimeSpan minCacheTime = TimeSpan.Zero; |
