aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Model/System/WakeOnLanInfo.cs
diff options
context:
space:
mode:
Diffstat (limited to 'MediaBrowser.Model/System/WakeOnLanInfo.cs')
-rw-r--r--MediaBrowser.Model/System/WakeOnLanInfo.cs38
1 files changed, 36 insertions, 2 deletions
diff --git a/MediaBrowser.Model/System/WakeOnLanInfo.cs b/MediaBrowser.Model/System/WakeOnLanInfo.cs
index 031458735..aba19a6ba 100644
--- a/MediaBrowser.Model/System/WakeOnLanInfo.cs
+++ b/MediaBrowser.Model/System/WakeOnLanInfo.cs
@@ -1,13 +1,47 @@
+using System.Net.NetworkInformation;
+
namespace MediaBrowser.Model.System
{
+ /// <summary>
+ /// Provides the MAC address and port for wake-on-LAN functionality.
+ /// </summary>
public class WakeOnLanInfo
{
- public string MacAddress { get; set; }
- public int Port { get; set; }
+ /// <summary>
+ /// Initializes a new instance of the <see cref="WakeOnLanInfo" /> class.
+ /// </summary>
+ /// <param name="macAddress">The MAC address.</param>
+ public WakeOnLanInfo(PhysicalAddress macAddress) : this(macAddress.ToString())
+ {
+ }
+
+ /// <summary>
+ /// Initializes a new instance of the <see cref="WakeOnLanInfo" /> class.
+ /// </summary>
+ /// <param name="macAddress">The MAC address.</param>
+ public WakeOnLanInfo(string macAddress) : this()
+ {
+ MacAddress = macAddress;
+ }
+ /// <summary>
+ /// Initializes a new instance of the <see cref="WakeOnLanInfo" /> class.
+ /// </summary>
public WakeOnLanInfo()
{
Port = 9;
}
+
+ /// <summary>
+ /// Gets the MAC address of the device.
+ /// </summary>
+ /// <value>The MAC address.</value>
+ public string? MacAddress { get; }
+
+ /// <summary>
+ /// Gets or sets the wake-on-LAN port.
+ /// </summary>
+ /// <value>The wake-on-LAN port.</value>
+ public int Port { get; set; }
}
}