/// <summary> /// Evaluate a predicate Expression and determine a key range which /// contains all items matched by the predicate. /// </summary> /// <param name="expression">The expression to evaluate.</param> /// <returns> /// A KeyRange that contains all items matched by the predicate. If no /// range can be determined the range will include all items. /// </returns> public static KeyRange <TKey> GetKeyRange(Expression <Predicate <KeyValuePair <TKey, TValue> > > expression) { if (null == expression) { throw new ArgumentNullException("expression"); } return(PredicateExpressionEvaluator <TKey> .GetKeyRange(expression.Body, KeyMemberInfo)); }
/// <summary> /// Evaluate a predicate Expression and determine a key range which /// contains all items matched by the predicate. /// </summary> /// <param name="expression">The expression to evaluate.</param> /// <returns> /// A KeyRange that contains all items matched by the predicate. If no /// range can be determined the range will include all items. /// </returns> public static KeyRange <TKey> GetKeyRange(Expression <Predicate <TKey> > expression) { if (null == expression) { throw new ArgumentNullException("expression"); } return(PredicateExpressionEvaluator <TKey> .GetKeyRange(expression.Body, null)); }