BaseItemPerson.cs 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. using System.Diagnostics;
  2. using System.Runtime.Serialization;
  3. namespace MediaBrowser.Model.Dto
  4. {
  5. /// <summary>
  6. /// This is used by the api to get information about a Person within a BaseItem
  7. /// </summary>
  8. [DebuggerDisplay("Name = {Name}, Role = {Role}, Type = {Type}")]
  9. public class BaseItemPerson
  10. {
  11. /// <summary>
  12. /// Gets or sets the name.
  13. /// </summary>
  14. /// <value>The name.</value>
  15. public string Name { get; set; }
  16. /// <summary>
  17. /// Gets or sets the identifier.
  18. /// </summary>
  19. /// <value>The identifier.</value>
  20. public string Id { get; set; }
  21. /// <summary>
  22. /// Gets or sets the role.
  23. /// </summary>
  24. /// <value>The role.</value>
  25. public string Role { get; set; }
  26. /// <summary>
  27. /// Gets or sets the type.
  28. /// </summary>
  29. /// <value>The type.</value>
  30. public string Type { get; set; }
  31. /// <summary>
  32. /// Gets or sets the primary image tag.
  33. /// </summary>
  34. /// <value>The primary image tag.</value>
  35. public string PrimaryImageTag { get; set; }
  36. /// <summary>
  37. /// Gets a value indicating whether this instance has primary image.
  38. /// </summary>
  39. /// <value><c>true</c> if this instance has primary image; otherwise, <c>false</c>.</value>
  40. [IgnoreDataMember]
  41. public bool HasPrimaryImage
  42. {
  43. get
  44. {
  45. return PrimaryImageTag != null;
  46. }
  47. }
  48. }
  49. }