2018-02-11 20:55:29 -05:00
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Reflection;
|
|
|
|
|
using System.Text;
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
|
|
|
|
|
namespace PoweredSoft.DynamicLinq
|
|
|
|
|
{
|
|
|
|
|
public enum ConditionOperators
|
|
|
|
|
{
|
|
|
|
|
Equal,
|
2018-02-12 22:27:09 -05:00
|
|
|
|
NotEqual,
|
2018-02-11 20:55:29 -05:00
|
|
|
|
GreaterThan,
|
|
|
|
|
GreaterThanOrEqual,
|
|
|
|
|
LessThan,
|
|
|
|
|
LessThanOrEqual,
|
|
|
|
|
Contains,
|
|
|
|
|
StartsWith,
|
|
|
|
|
EndsWith
|
|
|
|
|
}
|
|
|
|
|
|
2018-02-12 04:30:55 -05:00
|
|
|
|
public enum QueryConvertStrategy
|
|
|
|
|
{
|
|
|
|
|
LeaveAsIs,
|
|
|
|
|
ConvertConstantToComparedPropertyOrField
|
|
|
|
|
}
|
|
|
|
|
|
2018-02-12 22:27:09 -05:00
|
|
|
|
public enum QueryCollectionHandling
|
2018-02-12 21:28:53 -05:00
|
|
|
|
{
|
|
|
|
|
Any,
|
|
|
|
|
All
|
|
|
|
|
}
|
|
|
|
|
|
2018-02-11 20:55:29 -05:00
|
|
|
|
internal static class Constants
|
|
|
|
|
{
|
|
|
|
|
internal static readonly MethodInfo ContainsMethod = typeof(string).GetMethod("Contains");
|
|
|
|
|
internal static readonly MethodInfo StartsWithMethod = typeof(string).GetMethod("StartsWith", new Type[] { typeof(string) });
|
|
|
|
|
internal static readonly MethodInfo EndsWithMethod = typeof(string).GetMethod("EndsWith", new Type[] { typeof(string) });
|
2018-02-12 21:28:53 -05:00
|
|
|
|
internal static readonly MethodInfo AnyMethod = typeof(Enumerable).GetMethods(BindingFlags.Static | BindingFlags.Public).First(t => t.Name == "Any" && t.GetParameters().Count() == 2);
|
|
|
|
|
internal static readonly MethodInfo AllMethod = typeof(Enumerable).GetMethods(BindingFlags.Static | BindingFlags.Public).First(t => t.Name == "All" && t.GetParameters().Count() == 2);
|
2018-02-11 20:55:29 -05:00
|
|
|
|
}
|
|
|
|
|
}
|