public override bool SupportsPaging(CallNode callNode, TexlBinding binding) { IList <FirstNameNode> dsNodes; if (!TryGetDataSourceNodes(callNode, binding, out dsNodes)) { return(false); } var args = callNode.Args.Children.VerifyValue(); var count = args.Count(); for (int i = 1; i < count;) { if (!binding.IsPageable(args[i])) { return(false); } // If there are an odd number of args, the last arg also participates. i += 2; if (i == count) { i--; } } return(true); }
protected override bool RequiresPagedDataForParamCore(TexlNode[] args, int paramIndex, TexlBinding binding) { Contracts.AssertValue(args); Contracts.AssertAllValues(args); Contracts.Assert(0 <= paramIndex && paramIndex < args.Length); Contracts.AssertValue(binding); Contracts.Assert(binding.IsPageable(args[paramIndex].VerifyValue())); // For the second argument, we need only metadata. No actual data from datasource is required. return(paramIndex != 1); }