aboutsummaryrefslogtreecommitdiff
path: root/Emby.Dlna/PlayTo/UpnpContainer.cs
blob: 05f27603fbf1db10b0cebf7ee72847162bd08c6c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#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)
        {
            if (container == null)
            {
                throw new ArgumentNullException(nameof(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)
            };
        }
    }
}