-
Notifications
You must be signed in to change notification settings - Fork 5.3k
ConfigurationBinder handles ISet<> #68133
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
Merged
Changes from all commits
Commits
Show all changes
28 commits
Select commit
Hold shift + click to select a range
871166c
First pass
SteveDunn 3fe8714
Remove commented code
SteveDunn 65ea989
Support IReadOnlySet. Refactor out method that determines most suitab…
SteveDunn c2d1038
Handles ISet after rebase. Still to do IReadOnlySet
SteveDunn 2613c44
Add support back for `IReadOnlySet`
SteveDunn b377ac1
PR feedback - pre-allocate just one array instead of many allocations…
SteveDunn 10e6238
All tests pass.
SteveDunn c8e7b60
Tidy
SteveDunn ef33f6f
Skips custom sets
SteveDunn accbc13
Strip out unused code
SteveDunn 92afd9a
Tidy up and remove dead code.
SteveDunn 3687886
Tidy up tests
SteveDunn 3c65aa4
Tidy up comments
SteveDunn ee0b40b
Copy over @halter73's changes
SteveDunn 6b6f6cd
Copy over @halter73's changes
SteveDunn 6efcd54
Copy over @halter73's changes
SteveDunn 3454939
Added restrictions and some tests for set keys being string/enum only
SteveDunn 686192e
PR feedback re. preprocessor directive
SteveDunn b9a9f3a
Started on instantiated dictionary feedback
SteveDunn 32609c8
First pass at cloning dictionary<,>
SteveDunn 1310ebd
Can now bind (overwrite) to an existing concrete dictionary
SteveDunn da49d5b
Refactor out common code for binding to existing dictionary. Added te…
SteveDunn 3f359f4
Comments and more tests
SteveDunn c015c01
Add explicit (separate) test for binding to non-instantiated IReadOnl…
SteveDunn 93cf8c0
PR feedback - add tests
SteveDunn 1667f86
PR feedback: introdcue variable for `typeIsADictionaryInterface'
SteveDunn ca1defe
PR feedback
SteveDunn 72be954
Fix rebase issues
SteveDunn 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
Oops, something went wrong.
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.
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.
I don't think this fits in with the name of the method:
IsArrayCompatibleReadOnlyInterface-ICollection<>is not "read-only".Also, later in the
BindInstancemethod we are checking forICollection<>, does it need to be in both places?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 think the method is answering the question 'Should the type be treated as immutable?" - e.g. if it's one of these types, then return
trueto say not to append to the source, but clone it to a new collection.I've renamed it as such, although I do think it could be clearer. Do you have any thoughts?
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.
Why do we need to check for
ICollection<>in both places?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 think the second check for
ICollection<>is looking for anAddmethod to determine whether to set (add) members of the collection, or whether to bind to properties (line 358).Do you have any thoughts on how this could be made clearer? To be perfectly honest, I do find this method rather confusing!