-
Notifications
You must be signed in to change notification settings - Fork 421
FallbackIfEmpty: preserve source and fallback collections if possible #340
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
Merged
atifaziz
merged 10 commits into
morelinq:master
from
fsateler:fallback-if-empty-collection
Aug 23, 2017
Merged
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
ee938c0
FallbackIfEmpty: preserve source and fallback collections if possible
fsateler a521afa
Brace style
fsateler f5cb2b5
Better names and localizacion of inner methods
fsateler ccca164
Turn FallbackIfEmptyPreservesSourceCollectionIfPossible into test cases
fsateler 1d9b052
Use null check on count for choosing fallback
fsateler bef6cfe
Code formatting
atifaziz 0952f8d
Redundant parens
atifaziz e247774
Put offending value into ArgumentOutOfRangeException
atifaziz 52966cc
Revert "Turn FallbackIfEmptyPreservesSourceCollectionIfPossible into …
fsateler 16a78a9
Simplification of names
atifaziz File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider turning these into test cases.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did this on ccca164 , but I'm not sure it ended up being better, as it is a bunch of extra code noise.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree that ccca164 isn't any better. What I had more in mind was this:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But those test cases don't add much value, as they all test the same overload. The idea is to test that all overloads preserve the source collection.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Duh! My bad. All the overloading made it very opaque at the call site. Let's revert ccca164 then and ignore the remark about breaking it down into test cases.