UpnpContainer.cs 764 B

12345678910111213141516171819202122232425
  1. using System;
  2. using System.Xml.Linq;
  3. namespace MediaBrowser.Dlna.PlayTo
  4. {
  5. public class UpnpContainer : uBaseObject
  6. {
  7. public static uBaseObject Create(XElement container)
  8. {
  9. if (container == null)
  10. {
  11. throw new ArgumentNullException("container");
  12. }
  13. return new uBaseObject
  14. {
  15. Id = container.GetAttributeValue(uPnpNamespaces.Id),
  16. ParentId = container.GetAttributeValue(uPnpNamespaces.ParentId),
  17. Title = container.GetValue(uPnpNamespaces.title),
  18. IconUrl = container.GetValue(uPnpNamespaces.Artwork),
  19. UpnpClass = container.GetValue(uPnpNamespaces.uClass)
  20. };
  21. }
  22. }
  23. }