ProfileCondition.cs 1.0 KB

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