Person.cs 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. using MediaBrowser.Model.Dto;
  2. using System;
  3. using System.Collections.Generic;
  4. using System.Runtime.Serialization;
  5. namespace MediaBrowser.Controller.Entities
  6. {
  7. /// <summary>
  8. /// This is the full Person object that can be retrieved with all of it's data.
  9. /// </summary>
  10. public class Person : BaseItem, IItemByName
  11. {
  12. public Person()
  13. {
  14. UserItemCountList = new List<ItemByNameCounts>();
  15. }
  16. [IgnoreDataMember]
  17. public List<ItemByNameCounts> UserItemCountList { get; set; }
  18. /// <summary>
  19. /// Gets the user data key.
  20. /// </summary>
  21. /// <returns>System.String.</returns>
  22. public override string GetUserDataKey()
  23. {
  24. return "Person-" + Name;
  25. }
  26. }
  27. /// <summary>
  28. /// This is the small Person stub that is attached to BaseItems
  29. /// </summary>
  30. public class PersonInfo
  31. {
  32. /// <summary>
  33. /// Gets or sets the name.
  34. /// </summary>
  35. /// <value>The name.</value>
  36. public string Name { get; set; }
  37. /// <summary>
  38. /// Gets or sets the role.
  39. /// </summary>
  40. /// <value>The role.</value>
  41. public string Role { get; set; }
  42. /// <summary>
  43. /// Gets or sets the type.
  44. /// </summary>
  45. /// <value>The type.</value>
  46. public string Type { get; set; }
  47. /// <summary>
  48. /// Gets or sets the sort order - ascending
  49. /// </summary>
  50. /// <value>The sort order.</value>
  51. public int? SortOrder { get; set; }
  52. /// <summary>
  53. /// Returns a <see cref="System.String" /> that represents this instance.
  54. /// </summary>
  55. /// <returns>A <see cref="System.String" /> that represents this instance.</returns>
  56. public override string ToString()
  57. {
  58. return Name;
  59. }
  60. }
  61. }