BaseItemPerson.cs 1.6 KB

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