WakeOnLanInfo.cs 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. using System.Net.NetworkInformation;
  2. namespace MediaBrowser.Model.System
  3. {
  4. /// <summary>
  5. /// Provides the MAC address and port for wake-on-LAN functionality.
  6. /// </summary>
  7. public class WakeOnLanInfo
  8. {
  9. /// <summary>
  10. /// Returns the MAC address of the device.
  11. /// </summary>
  12. /// <value>The MAC address.</value>
  13. public string MacAddress { get; set; }
  14. /// <summary>
  15. /// Returns the wake-on-LAN port.
  16. /// </summary>
  17. /// <value>The wake-on-LAN port.</value>
  18. public int Port { get; set; }
  19. /// <summary>
  20. /// Initializes a new instance of the <see cref="WakeOnLanInfo" /> class.
  21. /// </summary>
  22. /// <param name="macAddress">The MAC address.</param>
  23. public WakeOnLanInfo(PhysicalAddress macAddress)
  24. {
  25. MacAddress = macAddress.ToString();
  26. Port = 9;
  27. }
  28. /// <summary>
  29. /// Initializes a new instance of the <see cref="WakeOnLanInfo" /> class.
  30. /// </summary>
  31. /// <param name="macAddress">The MAC address.</param>
  32. public WakeOnLanInfo(string macAddress)
  33. {
  34. MacAddress = macAddress;
  35. Port = 9;
  36. }
  37. /// <summary>
  38. /// Initializes a new instance of the <see cref="WakeOnLanInfo" /> class.
  39. /// </summary>
  40. public WakeOnLanInfo()
  41. {
  42. Port = 9;
  43. }
  44. }
  45. }