TryWhere(predicate)
TryWhere should behave as regular Where, but also filter out the items where
the predicate throws exception.
Many times a Where clause may be accessing a dictionary, or it may have have a
long invocation chain within the item where null checks are impractical and
only the "happy case" should have to be considered.
Of course it is undesirable to create a lot of exception, but the benefit in
code clarity can often be worth it. This may also be the difference from using
a lambda expression to using a named predicates declared elsewhere. Inlined
predicates become less readable with a sprinkled "if null" , "if
.ContainsKey()" and "if .Any()".
Original issue reported on code.google.com by tormod.s...@gmail.com on 16 Jun 2012 at 12:23
Original issue reported on code.google.com by
tormod.s...@gmail.com
on 16 Jun 2012 at 12:23