mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-09-06 13:57:14 -04:00
Did a simple search/replace on the whole repo (except the RSSDP project) This reduces LOC and should improve performance (methods containing a throw statement don't get inlined) ``` if \((\w+) == null\) \s+\{ \s+throw new ArgumentNullException\((.*)\); \s+\} ``` ``` ArgumentNullException.ThrowIfNull($1); ```
26 lines
739 B
C#
26 lines
739 B
C#
#pragma warning disable CS1591
|
|
|
|
using System;
|
|
using System.Xml.Linq;
|
|
using Emby.Dlna.Ssdp;
|
|
|
|
namespace Emby.Dlna.PlayTo
|
|
{
|
|
public class UpnpContainer : UBaseObject
|
|
{
|
|
public static UBaseObject Create(XElement container)
|
|
{
|
|
ArgumentNullException.ThrowIfNull(container);
|
|
|
|
return new UBaseObject
|
|
{
|
|
Id = container.GetAttributeValue(UPnpNamespaces.Id),
|
|
ParentId = container.GetAttributeValue(UPnpNamespaces.ParentId),
|
|
Title = container.GetValue(UPnpNamespaces.Title),
|
|
IconUrl = container.GetValue(UPnpNamespaces.Artwork),
|
|
UpnpClass = container.GetValue(UPnpNamespaces.Class)
|
|
};
|
|
}
|
|
}
|
|
}
|