Your ROOT_URL in app.ini is https://git.cloudchain.link/ but you are visiting https://dash.bss.nz/open-source-mirrors/Prowlarr/src/commit/e5a72bbef996474cdd98b8c1161878b76174dc0d/Marr.Data/QGen/SortColumn.cs You should set ROOT_URL correctly, otherwise the web may not work correctly.
Prowlarr/Marr.Data/QGen/SortColumn.cs

51 lines
1.3 KiB

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Linq.Expressions;
using System.Reflection;
namespace Marr.Data.QGen
{
public class SortColumn<T>
{
public SortColumn(Expression<Func<T, object>> sortExpression, SortDirection direction)
{
MemberExpression me = GetMemberExpression(sortExpression.Body);
DeclaringType = me.Expression.Type;
PropertyName = me.Member.Name;
Direction = direction;
}
public SortColumn(Type declaringType, string propertyName, SortDirection direction)
{
DeclaringType = declaringType;
PropertyName = propertyName;
Direction = direction;
}
public SortDirection Direction { get; private set; }
public Type DeclaringType { get; private set; }
public string PropertyName { get; private set; }
private MemberExpression GetMemberExpression(Expression exp)
{
MemberExpression me = exp as MemberExpression;
if (me == null)
{
var ue = exp as UnaryExpression;
me = ue.Operand as MemberExpression;
}
return me;
}
}
public enum SortDirection
{
Asc,
Desc
}
}