-
Notifications
You must be signed in to change notification settings - Fork 480
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
Remove constraint on T for ParseArguments with factory #590
Merged
moh-hassan
merged 6 commits into
commandlineparser:develop
from
pergardebrink:pergardebrink/removeconstraint
Mar 9, 2020
Merged
Remove constraint on T for ParseArguments with factory #590
moh-hassan
merged 6 commits into
commandlineparser:develop
from
pergardebrink:pergardebrink/removeconstraint
Mar 9, 2020
Conversation
This file contains 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
pergardebrink
force-pushed
the
pergardebrink/removeconstraint
branch
from
March 9, 2020 10:30
924721e
to
28b41f8
Compare
pergardebrink
force-pushed
the
pergardebrink/removeconstraint
branch
from
March 9, 2020 10:32
28b41f8
to
1a1b88f
Compare
Thanks @pergardebrink for your effort. |
moh-hassan
approved these changes
Mar 9, 2020
Just for correcting typo for the example in your post : public class FooBarOptions : IFoo, IBar
{
public FooBarOptions(string nonEmptyConstructor) { }
string IBar.BarFoo {get;set;}
string IFoo.FooBar { get; set; }
} |
No problem, and thanks for accepting the PR! I have another use case than my example that relied on having this working, so I was hoping to avoid forking the project just for that reason! ;) |
moh-hassan
pushed a commit
that referenced
this pull request
Mar 11, 2020
* Remove constraint on T for ParseArguments with factory * Make it possible to use factory for classes without public empty constructor * Allow types with explicitly defined interface implementations * Add test for #70 * Make sure explicit interface implementations can be parsed * Add test to make sure parser can detect explicit interface implementations
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Fix for #70 and #591
This makes it possible to have mutable types without empty constructor that only does explicit implementation of interfaces, like this (the IsMutable() check would fail previously in this particular case):