Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TryWhere() TrySelectOrFallback() #74

Open
GoogleCodeExporter opened this issue Dec 3, 2015 · 1 comment
Open

TryWhere() TrySelectOrFallback() #74

GoogleCodeExporter opened this issue Dec 3, 2015 · 1 comment

Comments

@GoogleCodeExporter
Copy link

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 [email protected] on 16 Jun 2012 at 12:23

@GoogleCodeExporter
Copy link
Author

This issue has been migrated to:
https://github.com/MoreLINQ/morelinq/issues/74
The conversation continues there.
DO NOT post any further comments to the issue tracker on Google Code as it is 
shutting down.
You can also just subscribe to the issue on GitHub to receive notifications of 
any further development.

Original comment by azizatif on 21 Aug 2015 at 6:55

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant