BaseItemInfo.cs 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. using System;
  2. using System.Diagnostics;
  3. using System.Runtime.Serialization;
  4. namespace MediaBrowser.Model.Entities
  5. {
  6. /// <summary>
  7. /// This is a stub class containing only basic information about an item
  8. /// </summary>
  9. [DebuggerDisplay("Name = {Name}, ID = {Id}, Type = {Type}")]
  10. public class BaseItemInfo
  11. {
  12. /// <summary>
  13. /// Gets or sets the name.
  14. /// </summary>
  15. /// <value>The name.</value>
  16. public string Name { get; set; }
  17. /// <summary>
  18. /// Gets or sets the id.
  19. /// </summary>
  20. /// <value>The id.</value>
  21. public string Id { get; set; }
  22. /// <summary>
  23. /// Gets or sets the type.
  24. /// </summary>
  25. /// <value>The type.</value>
  26. public string Type { get; set; }
  27. /// <summary>
  28. /// Gets or sets the type of the media.
  29. /// </summary>
  30. /// <value>The type of the media.</value>
  31. public string MediaType { get; set; }
  32. /// <summary>
  33. /// Gets or sets the run time ticks.
  34. /// </summary>
  35. /// <value>The run time ticks.</value>
  36. public long? RunTimeTicks { get; set; }
  37. /// <summary>
  38. /// Gets or sets the primary image tag.
  39. /// </summary>
  40. /// <value>The primary image tag.</value>
  41. public Guid? PrimaryImageTag { get; set; }
  42. /// <summary>
  43. /// Gets a value indicating whether this instance has primary image.
  44. /// </summary>
  45. /// <value><c>true</c> if this instance has primary image; otherwise, <c>false</c>.</value>
  46. [IgnoreDataMember]
  47. public bool HasPrimaryImage
  48. {
  49. get { return PrimaryImageTag.HasValue; }
  50. }
  51. }
  52. }