aboutsummaryrefslogtreecommitdiff
path: root/RSSDP/SsdpDeviceLocator.cs
diff options
context:
space:
mode:
authorBond-009 <bond.009@outlook.com>2019-01-16 19:10:42 +0100
committerGitHub <noreply@github.com>2019-01-16 19:10:42 +0100
commit900dc851e6c810f9e1772a6fb901a5a7e2801baf (patch)
tree205bac3cd6df971ee18739e59bd4da0ffe91718b /RSSDP/SsdpDeviceLocator.cs
parent07a8e49c4b1e4a2dddbaa49ab6f1ff4f271fbf20 (diff)
parent933ef438894ed233fec46badf58dd4f26492e832 (diff)
Merge branch 'dev' into cleanup
Diffstat (limited to 'RSSDP/SsdpDeviceLocator.cs')
-rw-r--r--RSSDP/SsdpDeviceLocator.cs8
1 files changed, 4 insertions, 4 deletions
diff --git a/RSSDP/SsdpDeviceLocator.cs b/RSSDP/SsdpDeviceLocator.cs
index 32289822f..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;
@@ -53,7 +53,7 @@ namespace Rssdp.Infrastructure
#region Events
/// <summary>
- /// Raised for when
+ /// Raised for when
/// <list type="bullet">
/// <item>An 'alive' notification is received that a device, regardless of whether or not that device is not already in the cache or has previously raised this event.</item>
/// <item>For each item found during a device <see cref="SearchAsync()"/> (cached or not), allowing clients to respond to found devices before the entire search is complete.</item>
@@ -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.");