ProfileCondition.cs 1.1 KB

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