2
0

UpnpContainer.cs 794 B

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