From 42c2ab97e7292cb8b61ec5dce2b2201450756d81 Mon Sep 17 00:00:00 2001 From: crobibero Date: Thu, 29 Oct 2020 11:32:02 -0600 Subject: Support IReadOnlyList for JsonCommaDelimitedArrayConverter --- .../Models/GenericBodyArrayModel.cs | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 tests/Jellyfin.Common.Tests/Models/GenericBodyArrayModel.cs (limited to 'tests/Jellyfin.Common.Tests/Models/GenericBodyArrayModel.cs') diff --git a/tests/Jellyfin.Common.Tests/Models/GenericBodyArrayModel.cs b/tests/Jellyfin.Common.Tests/Models/GenericBodyArrayModel.cs new file mode 100644 index 000000000..276e1bfbe --- /dev/null +++ b/tests/Jellyfin.Common.Tests/Models/GenericBodyArrayModel.cs @@ -0,0 +1,20 @@ +using System.Diagnostics.CodeAnalysis; +using System.Text.Json.Serialization; +using MediaBrowser.Common.Json.Converters; + +namespace Jellyfin.Common.Tests.Models +{ + /// + /// The generic body model. + /// + /// The value type. + public class GenericBodyArrayModel + { + /// + /// Gets or sets the value. + /// + [SuppressMessage("Microsoft.Performance", "CA1819:Properties should not return arrays", MessageId = "Value", Justification = "Imported from ServiceStack")] + [JsonConverter(typeof(JsonCommaDelimitedArrayConverterFactory))] + public T[] Value { get; set; } = default!; + } +} -- cgit v1.2.3