BaseItemPerson.cs 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. using System;
  2. using System.ComponentModel;
  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. public class BaseItemPerson : INotifyPropertyChanged
  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 role.
  18. /// </summary>
  19. /// <value>The role.</value>
  20. public string Role { get; set; }
  21. /// <summary>
  22. /// Gets or sets the type.
  23. /// </summary>
  24. /// <value>The type.</value>
  25. public string Type { get; set; }
  26. /// <summary>
  27. /// Gets or sets the primary image tag.
  28. /// </summary>
  29. /// <value>The primary image tag.</value>
  30. public Guid? PrimaryImageTag { get; set; }
  31. /// <summary>
  32. /// Gets a value indicating whether this instance has primary image.
  33. /// </summary>
  34. /// <value><c>true</c> if this instance has primary image; otherwise, <c>false</c>.</value>
  35. [IgnoreDataMember]
  36. public bool HasPrimaryImage
  37. {
  38. get
  39. {
  40. return PrimaryImageTag.HasValue;
  41. }
  42. }
  43. /// <summary>
  44. /// Occurs when [property changed].
  45. /// </summary>
  46. public event PropertyChangedEventHandler PropertyChanged;
  47. }
  48. /// <summary>
  49. /// Class StudioDto
  50. /// </summary>
  51. public class StudioDto
  52. {
  53. /// <summary>
  54. /// Gets or sets the name.
  55. /// </summary>
  56. /// <value>The name.</value>
  57. public string Name { get; set; }
  58. /// <summary>
  59. /// Gets or sets the primary image tag.
  60. /// </summary>
  61. /// <value>The primary image tag.</value>
  62. public Guid? PrimaryImageTag { get; set; }
  63. /// <summary>
  64. /// Gets a value indicating whether this instance has primary image.
  65. /// </summary>
  66. /// <value><c>true</c> if this instance has primary image; otherwise, <c>false</c>.</value>
  67. [IgnoreDataMember]
  68. public bool HasPrimaryImage
  69. {
  70. get
  71. {
  72. return PrimaryImageTag.HasValue;
  73. }
  74. }
  75. /// <summary>
  76. /// Occurs when [property changed].
  77. /// </summary>
  78. public event PropertyChangedEventHandler PropertyChanged;
  79. }
  80. }