Enable nullability for ServerDiscoveryInfo (#5804)
This commit is contained in:
parent
91d6ffd731
commit
b63f615fd4
|
@ -53,12 +53,7 @@ namespace Emby.Server.Implementations.Udp
|
||||||
|
|
||||||
if (!string.IsNullOrEmpty(localUrl))
|
if (!string.IsNullOrEmpty(localUrl))
|
||||||
{
|
{
|
||||||
var response = new ServerDiscoveryInfo
|
var response = new ServerDiscoveryInfo(localUrl, _appHost.SystemId, _appHost.FriendlyName);
|
||||||
{
|
|
||||||
Address = localUrl,
|
|
||||||
Id = _appHost.SystemId,
|
|
||||||
Name = _appHost.FriendlyName
|
|
||||||
};
|
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,32 +1,43 @@
|
||||||
#nullable disable
|
|
||||||
#pragma warning disable CS1591
|
|
||||||
|
|
||||||
namespace MediaBrowser.Model.ApiClient
|
namespace MediaBrowser.Model.ApiClient
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// The server discovery info model.
|
||||||
|
/// </summary>
|
||||||
public class ServerDiscoveryInfo
|
public class ServerDiscoveryInfo
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the address.
|
/// Initializes a new instance of the <see cref="ServerDiscoveryInfo"/> class.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <value>The address.</value>
|
/// <param name="address">The server address.</param>
|
||||||
public string Address { get; set; }
|
/// <param name="id">The server id.</param>
|
||||||
|
/// <param name="name">The server name.</param>
|
||||||
|
/// <param name="endpointAddress">The endpoint address.</param>
|
||||||
|
public ServerDiscoveryInfo(string address, string id, string name, string? endpointAddress = null)
|
||||||
|
{
|
||||||
|
Address = address;
|
||||||
|
Id = id;
|
||||||
|
Name = name;
|
||||||
|
EndpointAddress = endpointAddress;
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the server identifier.
|
/// Gets the address.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <value>The server identifier.</value>
|
public string Address { get; }
|
||||||
public string Id { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the name.
|
/// Gets the server identifier.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <value>The name.</value>
|
public string Id { get; }
|
||||||
public string Name { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the endpoint address.
|
/// Gets the name.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <value>The endpoint address.</value>
|
public string Name { get; }
|
||||||
public string EndpointAddress { get; set; }
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the endpoint address.
|
||||||
|
/// </summary>
|
||||||
|
public string? EndpointAddress { get; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user