public static PredicateBinding BindAs(this Predicate input, string varName) { Check.NotNull(input, "input"); Check.NotNull(varName, "varName"); Check.NotEmpty(varName, "varName"); CollectionType collectionType = input.ResultType.EdmType as CollectionType; if (collectionType == null) { throw new Exception(); } var inputRef = new VariableReferencePredicate(collectionType.TypeUsage, varName); return(new PredicateBinding(input, inputRef)); }
internal PredicateBinding(Predicate input, VariableReferencePredicate varRef) { _predicate = input; _varRef = varRef; }