-
-
Notifications
You must be signed in to change notification settings - Fork 601
Changed IConfigurator to return IConfigurator instead of void #1762
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
FrankRay78
merged 1 commit into
spectreconsole:main
from
byte2pixel:feature/1219/return-iconfigurator-not-void
Feb 24, 2025
Merged
Changed IConfigurator to return IConfigurator instead of void #1762
FrankRay78
merged 1 commit into
spectreconsole:main
from
byte2pixel:feature/1219/return-iconfigurator-not-void
Feb 24, 2025
Conversation
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
- SetHelpProvider - SetHelpProvider<T> - AddExample However, other methods like AddCommand narrow the configurator so order ends up making a difference.
|
Thanks, I'll review this shortly. |
FrankRay78
approved these changes
Feb 24, 2025
|
Many thanks @byte2pixel, much appreciated and welcome to the git commit history. |
@FrankRay78 Thanks, hopefully more to come. Hitting a busy patch at work with adding an embedded db to an application. |
This was referenced Jul 22, 2025
This was referenced Jul 30, 2025
This was referenced Oct 6, 2025
This was referenced Oct 13, 2025
This was referenced Oct 20, 2025
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.
Fixes #1219
Changes
Changed IConfigurator to return IConfigurator instead of void for the following interface methods:
SetHelpProviderSetHelpProvider<T>AddExampleHowever, other methods like AddCommand narrow the configurator so the order of chaining methods does matter. Just to point that out. Chaining is optional obviously.
I saw the ICofiguratorOfT also returns void for SetDescription, and AddExample. However, it becomes a bigger challenge to change that because
Configurator<T>implements bothIUnsafeBranchConfiguratorandIConfigurator<T>and both share the SetDescription and AddExample but one does not take in the generic type. Probably would need "unsafe configurator of T" or something?Please upvote 👍 this pull request if you are interested in it.