diff options
| author | Luke <luke.pulverenti@gmail.com> | 2016-12-18 00:44:33 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2016-12-18 00:44:33 -0500 |
| commit | e7cebb91a73354dc3e0d0b6340c9fbd6511f4406 (patch) | |
| tree | 6f1c368c766c17b7514fe749c0e92e69cd89194a /RSSDP/DeviceEventArgs.cs | |
| parent | 025905a3e4d50b9a2e07fbf4ff0a203af6604ced (diff) | |
| parent | aaa027f3229073e9a40756c3157d41af2a442922 (diff) | |
Merge pull request #2350 from MediaBrowser/beta
Beta
Diffstat (limited to 'RSSDP/DeviceEventArgs.cs')
| -rw-r--r-- | RSSDP/DeviceEventArgs.cs | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/RSSDP/DeviceEventArgs.cs b/RSSDP/DeviceEventArgs.cs new file mode 100644 index 000000000..e0c19c4c4 --- /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 |
