Argument.cs 809 B

1234567891011121314151617181920212223242526272829
  1. using System;
  2. using System.Xml.Linq;
  3. namespace MediaBrowser.Dlna.PlayTo
  4. {
  5. public class Argument
  6. {
  7. public string Name { get; set; }
  8. public string Direction { get; set; }
  9. public string RelatedStateVariable { get; set; }
  10. public static Argument FromXml(XElement container)
  11. {
  12. if (container == null)
  13. {
  14. throw new ArgumentNullException("container");
  15. }
  16. return new Argument
  17. {
  18. Name = container.GetValue(uPnpNamespaces.svc + "name"),
  19. Direction = container.GetValue(uPnpNamespaces.svc + "direction"),
  20. RelatedStateVariable = container.GetValue(uPnpNamespaces.svc + "relatedStateVariable")
  21. };
  22. }
  23. }
  24. }