ProfileCondition.cs 1.0 KB

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