GenericBodyListModel.cs 718 B

12345678910111213141516171819202122
  1. #pragma warning disable CA1002 // Do not expose generic lists
  2. #pragma warning disable CA2227 // Collection properties should be read only
  3. using System.Collections.Generic;
  4. using System.Text.Json.Serialization;
  5. using Jellyfin.Extensions.Json.Converters;
  6. namespace Jellyfin.Extensions.Tests.Json.Models
  7. {
  8. /// <summary>
  9. /// The generic body <c>List</c> model.
  10. /// </summary>
  11. /// <typeparam name="T">The value type.</typeparam>
  12. public sealed class GenericBodyListModel<T>
  13. {
  14. /// <summary>
  15. /// Gets or sets the value.
  16. /// </summary>
  17. [JsonConverter(typeof(JsonCommaDelimitedCollectionConverterFactory))]
  18. public List<T> Value { get; set; } = default!;
  19. }
  20. }