BaseItemPerson.cs 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. using ProtoBuf;
  2. using System;
  3. using System.ComponentModel;
  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. [ProtoContract]
  11. public class BaseItemPerson : INotifyPropertyChanged
  12. {
  13. /// <summary>
  14. /// Gets or sets the name.
  15. /// </summary>
  16. /// <value>The name.</value>
  17. [ProtoMember(1)]
  18. public string Name { get; set; }
  19. /// <summary>
  20. /// Gets or sets the role.
  21. /// </summary>
  22. /// <value>The role.</value>
  23. [ProtoMember(2)]
  24. public string Role { get; set; }
  25. /// <summary>
  26. /// Gets or sets the type.
  27. /// </summary>
  28. /// <value>The type.</value>
  29. [ProtoMember(3)]
  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. [ProtoMember(4)]
  36. public Guid? 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.HasValue;
  47. }
  48. }
  49. /// <summary>
  50. /// Occurs when [property changed].
  51. /// </summary>
  52. public event PropertyChangedEventHandler PropertyChanged;
  53. }
  54. }