UpnpContainer.cs 812 B

12345678910111213141516171819202122232425262728
  1. #pragma warning disable CS1591
  2. using System;
  3. using System.Xml.Linq;
  4. using Emby.Dlna.Ssdp;
  5. namespace Emby.Dlna.PlayTo
  6. {
  7. public class UpnpContainer : UBaseObject
  8. {
  9. public static UBaseObject Create(XElement container)
  10. {
  11. if (container == null)
  12. {
  13. throw new ArgumentNullException(nameof(container));
  14. }
  15. return new UBaseObject
  16. {
  17. Id = container.GetAttributeValue(UPnpNamespaces.Id),
  18. ParentId = container.GetAttributeValue(UPnpNamespaces.ParentId),
  19. Title = container.GetValue(UPnpNamespaces.Title),
  20. IconUrl = container.GetValue(UPnpNamespaces.Artwork),
  21. UpnpClass = container.GetValue(UPnpNamespaces.Class)
  22. };
  23. }
  24. }
  25. }