1
0
mirror of https://github.com/Sonarr/Sonarr.git synced 2026-04-21 22:05:38 -04:00
This commit is contained in:
Mark McDowall
2017-02-10 22:46:39 -08:00
committed by Taloth Saldono
parent 211f3769e1
commit 7297c1b8e4
399 changed files with 10618 additions and 1043 deletions
@@ -1,6 +1,7 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
namespace NzbDrone.Common.Extensions
{
@@ -108,5 +109,13 @@ namespace NzbDrone.Common.Extensions
{
return source.Select(predicate).ToList();
}
// public static IOrderedEnumerable<TEntity> OrderBy<TEntity>(this IEnumerable<TEntity> source, string propertyName, bool descending)
// {
// var property = typeof(TEntity).GetProperty(propertyName);
// Func<TEntity, Object> orderByFunc = x => property.GetValue(x, null);
//
// return descending ? source.OrderByDescending(orderByFunc) : source.OrderBy(orderByFunc);
// }
}
}