public Expression Get(RuleContext context, MethodCallExpression node) { if (context.Projection != null) { return(SpQueryable.MakeMax(context.EntityType, context.ProjectedType, context.ListItemsProvider, context.Query, context.Projection)); } return(SpQueryable.MakeMax(context.EntityType, context.ListItemsProvider, context.Query)); }
public Expression Get(RuleContext context, MethodCallExpression node) { var lambdaNode = (LambdaExpression)node.Arguments[1].StripQuotes(); return(SpQueryable.MakeMin( context.EntityType, context.ProjectedType, context.ListItemsProvider, context.Query, lambdaNode)); }
public Expression Get(RuleContext context, MethodCallExpression node) { if (context.ProjectionApplied) { return(SpQueryable.MakeFirst(context.EntityType, context.ProjectedType, context.ListItemsProvider, context.Query, ThrowIfNothing, ThrowIfMultiple, context.Projection)); } return(SpQueryable.MakeFirst(context.EntityType, context.ListItemsProvider, context.Query, ThrowIfNothing, ThrowIfMultiple)); }
public Expression Get(RuleContext context, MethodCallExpression node) { var count = (int)((ConstantExpression)node.Arguments[1].StripQuotes()).Value; if (context.ProjectionApplied) { return(SpQueryable.MakeElementAt(context.EntityType, context.ProjectedType, context.ListItemsProvider, context.Query, count, ThrowIfNothing, context.Projection)); } return(SpQueryable.MakeElementAt(context.EntityType, context.ListItemsProvider, context.Query, count, ThrowIfNothing)); }
public Expression Get(RuleContext context, MethodCallExpression node) { return(SpQueryable.MakeFetch(context.EntityType, context.ListItemsProvider, context.Query)); }
public Expression Get(RuleContext context, MethodCallExpression node) { var entityType = node.Method.GetGenericArguments()[0]; return(SpQueryable.MakeFetch(entityType, context.ListItemsProvider, context.Query)); }