ProfileCondition.cs 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. using System.Xml.Serialization;
  2. using MediaBrowser.Model.Dlna;
  3. namespace MediaBrowser.Model.Dlna
  4. {
  5. public class ProfileCondition
  6. {
  7. [XmlAttribute("condition")]
  8. public ProfileConditionType Condition { get; set; }
  9. [XmlAttribute("property")]
  10. public ProfileConditionValue Property { get; set; }
  11. [XmlAttribute("value")]
  12. public string Value { get; set; }
  13. [XmlAttribute("isRequired")]
  14. public bool IsRequired { get; set; }
  15. public ProfileCondition()
  16. {
  17. IsRequired = true;
  18. }
  19. public ProfileCondition(ProfileConditionType condition, ProfileConditionValue property, string value)
  20. : this(condition, property, value, false)
  21. {
  22. }
  23. public ProfileCondition(ProfileConditionType condition, ProfileConditionValue property, string value, bool isRequired)
  24. {
  25. Condition = condition;
  26. Property = property;
  27. Value = value;
  28. IsRequired = isRequired;
  29. }
  30. }
  31. }