aboutsummaryrefslogtreecommitdiff
path: root/RSSDP/SsdpDeviceLocator.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/SsdpDeviceLocator.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/SsdpDeviceLocator.cs')
-rw-r--r--RSSDP/SsdpDeviceLocator.cs6
1 files changed, 3 insertions, 3 deletions
diff --git a/RSSDP/SsdpDeviceLocator.cs b/RSSDP/SsdpDeviceLocator.cs
index c7daf359d..0a092e6b0 100644
--- a/RSSDP/SsdpDeviceLocator.cs
+++ b/RSSDP/SsdpDeviceLocator.cs
@@ -39,7 +39,7 @@ namespace Rssdp.Infrastructure
/// </summary>
public SsdpDeviceLocator(ISsdpCommunicationsServer communicationsServer, ITimerFactory timerFactory)
{
- if (communicationsServer == null) throw new ArgumentNullException("communicationsServer");
+ if (communicationsServer == null) throw new ArgumentNullException(nameof(communicationsServer));
_CommunicationsServer = communicationsServer;
_timerFactory = timerFactory;
@@ -164,8 +164,8 @@ namespace Rssdp.Infrastructure
private Task SearchAsync(string searchTarget, TimeSpan searchWaitTime, CancellationToken cancellationToken)
{
- if (searchTarget == null) throw new ArgumentNullException("searchTarget");
- if (searchTarget.Length == 0) throw new ArgumentException("searchTarget cannot be an empty string.", "searchTarget");
+ if (searchTarget == null) throw new ArgumentNullException(nameof(searchTarget));
+ if (searchTarget.Length == 0) throw new ArgumentException("searchTarget cannot be an empty string.", nameof(searchTarget));
if (searchWaitTime.TotalSeconds < 0) throw new ArgumentException("searchWaitTime must be a positive time.");
if (searchWaitTime.TotalSeconds > 0 && searchWaitTime.TotalSeconds <= 1) throw new ArgumentException("searchWaitTime must be zero (if you are not using the result and relying entirely in the events), or greater than one second.");