ApiBaseItem.cs 1001 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Runtime.Serialization;
  4. using MediaBrowser.Model.Users;
  5. namespace MediaBrowser.Model.Entities
  6. {
  7. /// <summary>
  8. /// This is a concrete class that the UI can use to deserialize
  9. /// It is flat in the sense that it will be used regardless of the type of BaseItem involved
  10. /// </summary>
  11. public class ApiBaseItem : BaseItem
  12. {
  13. }
  14. /// <summary>
  15. /// This is the full return object when requesting an Item
  16. /// </summary>
  17. public class ApiBaseItemWrapper<T>
  18. where T : BaseItem
  19. {
  20. public T Item { get; set; }
  21. public UserItemData UserItemData { get; set; }
  22. public IEnumerable<ApiBaseItemWrapper<T>> Children { get; set; }
  23. [IgnoreDataMember]
  24. public Type ItemType { get; set; }
  25. public string Type
  26. {
  27. get
  28. {
  29. return ItemType.Name;
  30. }
  31. }
  32. }
  33. }