ContainerProfile.cs 787 B

123456789101112131415161718192021222324252627282930
  1. using System.Collections.Generic;
  2. using System.Xml.Serialization;
  3. namespace MediaBrowser.Model.Dlna
  4. {
  5. public class ContainerProfile
  6. {
  7. [XmlAttribute("type")]
  8. public DlnaProfileType Type { get; set; }
  9. public ProfileCondition[] Conditions { get; set; }
  10. [XmlAttribute("container")]
  11. public string Container { get; set; }
  12. public ContainerProfile()
  13. {
  14. Conditions = new ProfileCondition[] { };
  15. }
  16. public List<string> GetContainers()
  17. {
  18. List<string> list = new List<string>();
  19. foreach (string i in (Container ?? string.Empty).Split(','))
  20. {
  21. if (!string.IsNullOrEmpty(i)) list.Add(i);
  22. }
  23. return list;
  24. }
  25. }
  26. }