Enable nullabe reference types for MediaBrowser.Model

This commit is contained in:
Bond_009
2020-04-05 18:10:56 +02:00
parent 29539174a3
commit 30ce346f34
208 changed files with 636 additions and 506 deletions

View File

@@ -1,3 +1,4 @@
#nullable disable
#pragma warning disable CS1591
using System;

View File

@@ -1,3 +1,4 @@
#nullable disable
#pragma warning disable CS1591
namespace MediaBrowser.Model.System

View File

@@ -1,3 +1,4 @@
#nullable disable
#pragma warning disable CS1591
using System;
@@ -34,7 +35,6 @@ namespace MediaBrowser.Model.System
/// <value>The display name of the operating system.</value>
public string OperatingSystemDisplayName { get; set; }
/// <summary>
/// Get or sets the package name.
/// </summary>

View File

@@ -7,36 +7,21 @@ namespace MediaBrowser.Model.System
/// </summary>
public class WakeOnLanInfo
{
/// <summary>
/// Returns the MAC address of the device.
/// </summary>
/// <value>The MAC address.</value>
public string MacAddress { get; set; }
/// <summary>
/// Returns the wake-on-LAN port.
/// </summary>
/// <value>The wake-on-LAN port.</value>
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)
public WakeOnLanInfo(PhysicalAddress macAddress) : this(macAddress.ToString())
{
MacAddress = macAddress.ToString();
Port = 9;
}
/// <summary>
/// Initializes a new instance of the <see cref="WakeOnLanInfo" /> class.
/// </summary>
/// <param name="macAddress">The MAC address.</param>
public WakeOnLanInfo(string macAddress)
public WakeOnLanInfo(string macAddress) : this()
{
MacAddress = macAddress;
Port = 9;
}
/// <summary>
@@ -46,5 +31,17 @@ namespace MediaBrowser.Model.System
{
Port = 9;
}
/// <summary>
/// Gets the MAC address of the device.
/// </summary>
/// <value>The MAC address.</value>
public string? MacAddress { get; set; }
/// <summary>
/// Gets or sets the wake-on-LAN port.
/// </summary>
/// <value>The wake-on-LAN port.</value>
public int Port { get; set; }
}
}