mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-01-15 23:58:57 +00:00
Fix warnings, improve performance (#1665)
* Fix warnings, improve performance `QueryResult.Items` is now a `IReadOnlyList` so we don't need to allocate a new `Array` when we have a `List` (and `Items` shouldn't need to be mutable anyway) * Update Providers .csproj to latest C# * Remove extra newline from DtoService.cs * Remove extra newline from UserLibraryService.cs
This commit is contained in:
@@ -1,3 +1,6 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace MediaBrowser.Model.Querying
|
||||
{
|
||||
public class QueryResult<T>
|
||||
@@ -6,7 +9,7 @@ namespace MediaBrowser.Model.Querying
|
||||
/// Gets or sets the items.
|
||||
/// </summary>
|
||||
/// <value>The items.</value>
|
||||
public T[] Items { get; set; }
|
||||
public IReadOnlyList<T> Items { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The total number of records available
|
||||
@@ -16,7 +19,7 @@ namespace MediaBrowser.Model.Querying
|
||||
|
||||
public QueryResult()
|
||||
{
|
||||
Items = new T[] { };
|
||||
Items = Array.Empty<T>();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user