diff options
Diffstat (limited to 'Emby.Dlna/Common')
| -rw-r--r-- | Emby.Dlna/Common/Argument.cs | 19 | ||||
| -rw-r--r-- | Emby.Dlna/Common/DeviceIcon.cs | 28 | ||||
| -rw-r--r-- | Emby.Dlna/Common/DeviceService.cs | 35 | ||||
| -rw-r--r-- | Emby.Dlna/Common/ServiceAction.cs | 28 | ||||
| -rw-r--r-- | Emby.Dlna/Common/StateVariable.cs | 33 |
5 files changed, 104 insertions, 39 deletions
diff --git a/Emby.Dlna/Common/Argument.cs b/Emby.Dlna/Common/Argument.cs index 3e325c41c..e4e9c55e0 100644 --- a/Emby.Dlna/Common/Argument.cs +++ b/Emby.Dlna/Common/Argument.cs @@ -1,12 +1,23 @@ - namespace Emby.Dlna.Common { + /// <summary> + /// DLNA Query parameter type, used when querying DLNA devices via SOAP. + /// </summary> public class Argument { - public string Name { get; set; } + /// <summary> + /// Gets or sets name of the DLNA argument. + /// </summary> + public string Name { get; set; } = string.Empty; - public string Direction { get; set; } + /// <summary> + /// Gets or sets the direction of the parameter. + /// </summary> + public string Direction { get; set; } = string.Empty; - public string RelatedStateVariable { get; set; } + /// <summary> + /// Gets or sets the related DLNA state variable for this argument. + /// </summary> + public string RelatedStateVariable { get; set; } = string.Empty; } } diff --git a/Emby.Dlna/Common/DeviceIcon.cs b/Emby.Dlna/Common/DeviceIcon.cs index 3a91b952e..f9fd1dcec 100644 --- a/Emby.Dlna/Common/DeviceIcon.cs +++ b/Emby.Dlna/Common/DeviceIcon.cs @@ -1,21 +1,41 @@ +using System.Globalization; namespace Emby.Dlna.Common { + /// <summary> + /// Defines the <see cref="DeviceIcon" />. + /// </summary> public class DeviceIcon { - public string Url { get; set; } + /// <summary> + /// Gets or sets the Url. + /// </summary> + public string Url { get; set; } = string.Empty; - public string MimeType { get; set; } + /// <summary> + /// Gets or sets the MimeType. + /// </summary> + public string MimeType { get; set; } = string.Empty; + /// <summary> + /// Gets or sets the Width. + /// </summary> public int Width { get; set; } + /// <summary> + /// Gets or sets the Height. + /// </summary> public int Height { get; set; } - public string Depth { get; set; } + /// <summary> + /// Gets or sets the Depth. + /// </summary> + public string Depth { get; set; } = string.Empty; + /// <inheritdoc /> public override string ToString() { - return string.Format("{0}x{1}", Height, Width); + return string.Format(CultureInfo.InvariantCulture, "{0}x{1}", Height, Width); } } } diff --git a/Emby.Dlna/Common/DeviceService.cs b/Emby.Dlna/Common/DeviceService.cs index c60d65291..c1369558e 100644 --- a/Emby.Dlna/Common/DeviceService.cs +++ b/Emby.Dlna/Common/DeviceService.cs @@ -1,21 +1,36 @@ - namespace Emby.Dlna.Common { + /// <summary> + /// Defines the <see cref="DeviceService" />. + /// </summary> public class DeviceService { - public string ServiceType { get; set; } + /// <summary> + /// Gets or sets the Service Type. + /// </summary> + public string ServiceType { get; set; } = string.Empty; - public string ServiceId { get; set; } + /// <summary> + /// Gets or sets the Service Id. + /// </summary> + public string ServiceId { get; set; } = string.Empty; - public string ScpdUrl { get; set; } + /// <summary> + /// Gets or sets the Scpd Url. + /// </summary> + public string ScpdUrl { get; set; } = string.Empty; - public string ControlUrl { get; set; } + /// <summary> + /// Gets or sets the Control Url. + /// </summary> + public string ControlUrl { get; set; } = string.Empty; - public string EventSubUrl { get; set; } + /// <summary> + /// Gets or sets the EventSubUrl. + /// </summary> + public string EventSubUrl { get; set; } = string.Empty; - public override string ToString() - { - return string.Format("{0}", ServiceId); - } + /// <inheritdoc /> + public override string ToString() => ServiceId; } } diff --git a/Emby.Dlna/Common/ServiceAction.cs b/Emby.Dlna/Common/ServiceAction.cs index 5e030d396..02b81a0aa 100644 --- a/Emby.Dlna/Common/ServiceAction.cs +++ b/Emby.Dlna/Common/ServiceAction.cs @@ -2,20 +2,30 @@ using System.Collections.Generic; namespace Emby.Dlna.Common { + /// <summary> + /// Defines the <see cref="ServiceAction" />. + /// </summary> public class ServiceAction { - public string Name { get; set; } - - public List<Argument> ArgumentList { get; set; } - - public override string ToString() - { - return Name; - } - + /// <summary> + /// Initializes a new instance of the <see cref="ServiceAction"/> class. + /// </summary> public ServiceAction() { ArgumentList = new List<Argument>(); } + + /// <summary> + /// Gets or sets the name of the action. + /// </summary> + public string Name { get; set; } = string.Empty; + + /// <summary> + /// Gets the ArgumentList. + /// </summary> + public List<Argument> ArgumentList { get; } + + /// <inheritdoc /> + public override string ToString() => Name; } } diff --git a/Emby.Dlna/Common/StateVariable.cs b/Emby.Dlna/Common/StateVariable.cs index 4ca84bf51..fd733e085 100644 --- a/Emby.Dlna/Common/StateVariable.cs +++ b/Emby.Dlna/Common/StateVariable.cs @@ -1,25 +1,34 @@ using System; +using System.Collections.Generic; namespace Emby.Dlna.Common { + /// <summary> + /// Defines the <see cref="StateVariable" />. + /// </summary> public class StateVariable { - public string Name { get; set; } + /// <summary> + /// Gets or sets the name of the state variable. + /// </summary> + public string Name { get; set; } = string.Empty; - public string DataType { get; set; } + /// <summary> + /// Gets or sets the data type of the state variable. + /// </summary> + public string DataType { get; set; } = string.Empty; + /// <summary> + /// Gets or sets a value indicating whether it sends events. + /// </summary> public bool SendsEvents { get; set; } - public string[] AllowedValues { get; set; } + /// <summary> + /// Gets or sets the allowed values range. + /// </summary> + public IReadOnlyList<string> AllowedValues { get; set; } = Array.Empty<string>(); - public override string ToString() - { - return Name; - } - - public StateVariable() - { - AllowedValues = Array.Empty<string>(); - } + /// <inheritdoc /> + public override string ToString() => Name; } } |
