BaseItemPerson.cs 1.8 KB

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