aboutsummaryrefslogtreecommitdiff
path: root/RSSDP/DeviceEventArgs.cs
diff options
context:
space:
mode:
authorLuke <luke.pulverenti@gmail.com>2016-10-30 03:29:27 -0400
committerGitHub <noreply@github.com>2016-10-30 03:29:27 -0400
commitd31b0f7be4b14e4ada999c97e675b856ad68352b (patch)
treea4619513efbb3be62a6204c996526df606cb62c5 /RSSDP/DeviceEventArgs.cs
parentb19f75fcae017cb51f1e58eb2d54ca84620b6ee0 (diff)
parent3094cd7ff3e51578808ce1b6f56b141930c18004 (diff)
Merge pull request #2258 from MediaBrowser/dev
Dev
Diffstat (limited to 'RSSDP/DeviceEventArgs.cs')
-rw-r--r--RSSDP/DeviceEventArgs.cs49
1 files changed, 49 insertions, 0 deletions
diff --git a/RSSDP/DeviceEventArgs.cs b/RSSDP/DeviceEventArgs.cs
new file mode 100644
index 0000000000..e0c19c4c47
--- /dev/null
+++ b/RSSDP/DeviceEventArgs.cs
@@ -0,0 +1,49 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+namespace Rssdp
+{
+ /// <summary>
+ /// Event arguments for the <see cref="SsdpDevice.DeviceAdded"/> and <see cref="SsdpDevice.DeviceRemoved"/> events.
+ /// </summary>
+ public sealed class DeviceEventArgs : EventArgs
+ {
+
+ #region Fields
+
+ private readonly SsdpDevice _Device;
+
+ #endregion
+
+ #region Constructors
+
+ /// <summary>
+ /// Constructs a new instance for the specified <see cref="SsdpDevice"/>.
+ /// </summary>
+ /// <param name="device">The <see cref="SsdpDevice"/> associated with the event this argument class is being used for.</param>
+ /// <exception cref="System.ArgumentNullException">Thrown if the <paramref name="device"/> argument is null.</exception>
+ public DeviceEventArgs(SsdpDevice device)
+ {
+ if (device == null) throw new ArgumentNullException("device");
+
+ _Device = device;
+ }
+
+ #endregion
+
+ #region Public Properties
+
+ /// <summary>
+ /// Returns the <see cref="SsdpDevice"/> instance the event being raised for.
+ /// </summary>
+ public SsdpDevice Device
+ {
+ get { return _Device; }
+ }
+
+ #endregion
+
+ }
+} \ No newline at end of file