diff options
| author | Andrew Rabert <6550543+nvllsvm@users.noreply.github.com> | 2019-01-22 18:13:47 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-01-22 18:13:47 -0500 |
| commit | 28483bdb54be96ae83e0fded097f534d7e26ba1e (patch) | |
| tree | e7f4b92326417ebf55eecdf68a01d2c3b9e660d7 /RSSDP/SsdpDevice.cs | |
| parent | 920c39454c05e979eabe81877269cd4517a03ccf (diff) | |
| parent | 8106c8393b711a7e1d40487e3caf2b014decbe28 (diff) | |
Merge pull request #651 from jellyfin/release-10.1.0
Release 10.1.0
Diffstat (limited to 'RSSDP/SsdpDevice.cs')
| -rw-r--r-- | RSSDP/SsdpDevice.cs | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/RSSDP/SsdpDevice.cs b/RSSDP/SsdpDevice.cs index ef6869c8b..b4c4a88fd 100644 --- a/RSSDP/SsdpDevice.cs +++ b/RSSDP/SsdpDevice.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.Collections.ObjectModel; using System.Text; @@ -75,7 +75,7 @@ namespace Rssdp return rootDevice; } - + #region Public Properties #region UPnP Device Description Properties @@ -276,12 +276,12 @@ namespace Rssdp /// <para>If the device is already a member of the <see cref="Devices"/> collection, this method does nothing.</para> /// <para>Also sets the <see cref="SsdpEmbeddedDevice.RootDevice"/> property of the added device and all descendant devices to the relevant <see cref="SsdpRootDevice"/> instance.</para> /// </remarks> - /// <exception cref="System.ArgumentNullException">Thrown if the <paramref name="device"/> argument is null.</exception> - /// <exception cref="System.InvalidOperationException">Thrown if the <paramref name="device"/> is already associated with a different <see cref="SsdpRootDevice"/> instance than used in this tree. Can occur if you try to add the same device instance to more than one tree. Also thrown if you try to add a device to itself.</exception> + /// <exception cref="ArgumentNullException">Thrown if the <paramref name="device"/> argument is null.</exception> + /// <exception cref="InvalidOperationException">Thrown if the <paramref name="device"/> is already associated with a different <see cref="SsdpRootDevice"/> instance than used in this tree. Can occur if you try to add the same device instance to more than one tree. Also thrown if you try to add a device to itself.</exception> /// <seealso cref="DeviceAdded"/> public void AddDevice(SsdpEmbeddedDevice device) { - if (device == null) throw new ArgumentNullException("device"); + if (device == null) throw new ArgumentNullException(nameof(device)); if (device.RootDevice != null && device.RootDevice != this.ToRootDevice()) throw new InvalidOperationException("This device is already associated with a different root device (has been added as a child in another branch)."); if (device == this) throw new InvalidOperationException("Can't add device to itself."); @@ -305,11 +305,11 @@ namespace Rssdp /// <para>If the device is not a member of the <see cref="Devices"/> collection, this method does nothing.</para> /// <para>Also sets the <see cref="SsdpEmbeddedDevice.RootDevice"/> property to null for the removed device and all descendant devices.</para> /// </remarks> - /// <exception cref="System.ArgumentNullException">Thrown if the <paramref name="device"/> argument is null.</exception> + /// <exception cref="ArgumentNullException">Thrown if the <paramref name="device"/> argument is null.</exception> /// <seealso cref="DeviceRemoved"/> public void RemoveDevice(SsdpEmbeddedDevice device) { - if (device == null) throw new ArgumentNullException("device"); + if (device == null) throw new ArgumentNullException(nameof(device)); bool wasRemoved = false; lock (_Devices) @@ -330,7 +330,7 @@ namespace Rssdp /// </summary> /// <param name="device">The <see cref="SsdpEmbeddedDevice"/> instance added to the <see cref="Devices"/> collection.</param> /// <seealso cref="AddDevice"/> - /// <seealso cref="DeviceAdded"/> + /// <seealso cref="DeviceAdded"/> protected virtual void OnDeviceAdded(SsdpEmbeddedDevice device) { var handlers = this.DeviceAdded; |
