You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
recyclarr/src/Recyclarr.ServarrApi/QualityProfile/QualityProfileApiExtensions.cs

15 lines
494 B

using Recyclarr.Common.Extensions;
namespace Recyclarr.ServarrApi.QualityProfile;
public static class QualityProfileApiExtensions
{
public static QualityProfileDto ReverseItems(this QualityProfileDto dto)
{
return dto with {Items = ReverseItemsImpl(dto.Items).AsReadOnly()};
static ICollection<ProfileItemDto> ReverseItemsImpl(IEnumerable<ProfileItemDto> items)
=> items.Reverse().Select(x => x with {Items = ReverseItemsImpl(x.Items)}).ToList();
}
}