Updated code to correct build errors for Jelyfin.Data and Jellyfin.Database.Implementations
This commit is contained in:
@@ -13,7 +13,6 @@ using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Contains helpers to partition EFCore queries.
|
||||
/// </summary>
|
||||
@@ -61,6 +60,7 @@ public static class QueryPartitionHelpers
|
||||
/// <returns>A queryable that can be used to partition.</returns>
|
||||
public static ProgressablePartitionReporting<TEntity> WithPartitionProgress<TEntity>(this ProgressablePartitionReporting<TEntity> progressable, Action<int>? beginPartition = null, Action<int, TimeSpan>? endPartition = null)
|
||||
{
|
||||
ArgumentNullException.ThrowIfNull(progressable);
|
||||
progressable.OnBeginPartition = beginPartition;
|
||||
progressable.OnEndPartition = endPartition;
|
||||
return progressable;
|
||||
@@ -76,6 +76,7 @@ public static class QueryPartitionHelpers
|
||||
/// <returns>A queryable that can be used to partition.</returns>
|
||||
public static ProgressablePartitionReporting<TEntity> WithItemProgress<TEntity>(this ProgressablePartitionReporting<TEntity> progressable, Action<TEntity, int, int>? beginItem = null, Action<TEntity, int, int, TimeSpan>? endItem = null)
|
||||
{
|
||||
ArgumentNullException.ThrowIfNull(progressable);
|
||||
progressable.OnBeginItem = beginItem;
|
||||
progressable.OnEndItem = endItem;
|
||||
return progressable;
|
||||
@@ -91,6 +92,7 @@ public static class QueryPartitionHelpers
|
||||
/// <returns>A enumerable representing the whole of the query.</returns>
|
||||
public static async IAsyncEnumerable<TEntity> PartitionAsync<TEntity>(this ProgressablePartitionReporting<TEntity> partitionInfo, int partitionSize, [EnumeratorCancellation] CancellationToken cancellationToken = default)
|
||||
{
|
||||
ArgumentNullException.ThrowIfNull(partitionInfo);
|
||||
await foreach (var item in partitionInfo.Source.PartitionAsync(partitionSize, partitionInfo, cancellationToken).ConfigureAwait(false))
|
||||
{
|
||||
yield return item;
|
||||
@@ -107,6 +109,7 @@ public static class QueryPartitionHelpers
|
||||
/// <returns>A enumerable representing the whole of the query.</returns>
|
||||
public static async IAsyncEnumerable<TEntity> PartitionEagerAsync<TEntity>(this ProgressablePartitionReporting<TEntity> partitionInfo, int partitionSize, [EnumeratorCancellation] CancellationToken cancellationToken = default)
|
||||
{
|
||||
ArgumentNullException.ThrowIfNull(partitionInfo);
|
||||
await foreach (var item in partitionInfo.Source.PartitionEagerAsync(partitionSize, partitionInfo, cancellationToken).ConfigureAwait(false))
|
||||
{
|
||||
yield return item;
|
||||
|
||||
Reference in New Issue
Block a user