mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-10-26 16:45:09 +00:00
Replace array-typed properties with IReadOnlyList<T> to satisfy CA1819 (Properties should not return arrays). Uses collection expressions for initialization. IReadOnlyList<T> serializes identically to a JSON array, so the OpenAPI schema and wire format are unchanged. The only construction site assigns the result of .ToArray(), which still satisfies IReadOnlyList<T>.
27 lines
576 B
C#
27 lines
576 B
C#
#nullable disable
|
|
#pragma warning disable CS1591
|
|
|
|
using System.Collections.Generic;
|
|
|
|
namespace MediaBrowser.Model.Querying
|
|
{
|
|
public class QueryFiltersLegacy
|
|
{
|
|
public QueryFiltersLegacy()
|
|
{
|
|
Genres = [];
|
|
Tags = [];
|
|
OfficialRatings = [];
|
|
Years = [];
|
|
}
|
|
|
|
public IReadOnlyList<string> Genres { get; set; }
|
|
|
|
public IReadOnlyList<string> Tags { get; set; }
|
|
|
|
public IReadOnlyList<string> OfficialRatings { get; set; }
|
|
|
|
public IReadOnlyList<int> Years { get; set; }
|
|
}
|
|
}
|