You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
jellyfin/RSSDP/SsdpEmbeddedDevice.cs

56 lines
1.3 KiB

using System;
using System.Collections.Generic;
using System.Text;
namespace Rssdp
{
/// <summary>
/// Represents a device that is a descendant of a <see cref="SsdpRootDevice"/> instance.
/// </summary>
public class SsdpEmbeddedDevice : SsdpDevice
{
#region Fields
private SsdpRootDevice _RootDevice;
#endregion
#region Constructors
/// <summary>
/// Default constructor.
/// </summary>
public SsdpEmbeddedDevice()
{
}
#endregion
#region Public Properties
/// <summary>
/// Returns the <see cref="SsdpRootDevice"/> that is this device's first ancestor. If this device is itself an <see cref="SsdpRootDevice"/>, then returns a reference to itself.
/// </summary>
public SsdpRootDevice RootDevice
{
get
{
return _RootDevice;
}
internal set
{
_RootDevice = value;
lock (this.Devices)
{
foreach (var embeddedDevice in this.Devices)
{
((SsdpEmbeddedDevice)embeddedDevice).RootDevice = _RootDevice;
}
}
}
}
#endregion
}
}